<s> import fbuild <EOL> import fbuild . builders . c <EOL> import fbuild . config . c as c <EOL> import fbuild . temp <EOL> class windows_h ( c . Test ) : <EOL> header = c . header_test ( '<STR_LIT>' ) <EOL> @ c . cacheproperty <EOL> def LoadLibrary ( self ) : <EOL> shared = fbuild . builders . c . guess_shared ( self . ctx ) <EOL> lib_code = '''<STR_LIT>''' <EOL> exe_code = '''<STR_LIT>''' <EOL> self . ctx . logger . check ( "<STR_LIT>" ) <EOL> with fbuild . temp . tempfile ( lib_code , self . builder . src_suffix ) as lib_src : <EOL> try : <EOL> obj = shared . uncached_compile ( lib_src , quieter = <NUM_LIT:1> ) <EOL> lib = shared . uncached_link_lib ( lib_src . parent / '<STR_LIT>' , [ obj ] , <EOL> quieter = <NUM_LIT:1> ) <EOL> except fbuild . ExecutionError : <EOL> pass <EOL> else : <EOL> if self . builder . try_run ( exe_code % lib , quieter = <NUM_LIT:1> ) : <EOL> self . ctx . logger . passed ( ) <EOL> return c . Function ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . ctx . logger . failed ( ) <EOL> return None <EOL> def GetProcAddress ( self ) : <EOL> if self . LoadLibrary : <EOL> return c . Function ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) </s>
