MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / LoadFunctionAddr

Function LoadFunctionAddr

src/include/sharedLibrary.h:92–106  ·  view source on GitHub ↗

This takes a shared module handle returned from LoadSharedLibrary, and a text string of a symbol to load from the module, and returns a pointer to that symbol. If the symbol is not found, NULL is returned. If the module handle is NULL, NULL is returned.

Source from the content-addressed store, hash-verified

90// to load from the module, and returns a pointer to that symbol. If the symbol is not found, NULL
91// is returned. If the module handle is NULL, NULL is returned.
92inline void* LoadFunctionAddr( void* libHandle, std::string funcName )
93{
94 if( libHandle == NULL )
95 return NULL;
96
97#if defined( _WIN32 )
98 HMODULE fileHandle = reinterpret_cast< HMODULE >( libHandle );
99
100 void* pFunc = reinterpret_cast< void* >( ::GetProcAddress( fileHandle, funcName.c_str( ) ) );
101#else
102 void* pFunc = ::dlsym( libHandle, funcName.c_str( ) );
103#endif
104
105 return pFunc;
106}
107
108#endif // _SHAREDLIBRARY_H_

Callers 2

clfftSetupFunction · 0.85
transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected