MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / LoadFunc

Function LoadFunc

include/hx/CFFILoader.h:212–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210 #ifdef NEKO_WINDOWS // {
211
212 void *LoadFunc(const char *inName)
213 {
214 #ifndef HX_WINRT
215 static const char *modules[] = { 0, "hxcpp", "hxcpp-debug" };
216 for(int i=0; i<3 && sResolveProc==0; i++)
217 {
218 HMODULE handle = GetModuleHandleA(modules[i]);
219 if (handle)
220 {
221 sResolveProc = (ResolveProc)GetProcAddress(handle,"hx_cffi");
222 if (sResolveProc==0)
223 FreeLibrary(handle);
224 }
225 }
226 #endif
227
228 #ifdef NEKO_COMPATIBLE
229 if (sResolveProc==0)
230 {
231 sResolveProc = InitDynamicNekoLoader();
232 }
233 #endif
234
235 if (sResolveProc==0)
236 {
237 fprintf(stderr,"Could not link plugin to process (hxCFFILoader.h %d)\n",__LINE__);
238 exit(1);
239 }
240 return ResolveDefault(inName);
241 }
242
243 #else // windows } { not windows
244

Callers

nothing calls this directly

Calls 2

InitDynamicNekoLoaderFunction · 0.85
ResolveDefaultFunction · 0.85

Tested by

no test coverage detected