MCPcopy Create free account
hub / github.com/RamonUnch/AltSnap / LoadDLLProc

Function LoadDLLProc

unfuck.h:456–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456static FARPROC LoadDLLProc(const char *DLLname, const char *PROCname)
457{
458 HINSTANCE hdll;
459 FARPROC ret = (FARPROC)NULL;
460
461 if((hdll = GetModuleHandleA(DLLname))) {
462 return GetProcAddress(hdll, PROCname);
463 }
464 hdll = LoadLibraryA(DLLname);
465 if (hdll) {
466 ret = GetProcAddress(hdll, PROCname);
467 if (!ret) FreeLibrary(hdll);
468 }
469 return ret;
470}
471
472/* Accurate Sleep, needs WINMM.DLL */
473static void ASleep(DWORD duration_ms)

Callers 15

GetAncestorLFunction · 0.85
GetMonitorInfoLFunction · 0.85
EnumDisplayMonitorsLFunction · 0.85
MonitorFromPointLFunction · 0.85
MonitorFromWindowLFunction · 0.85
GetGUIThreadInfoLFunction · 0.85
GetDpiForMonitorLFunction · 0.85
GetSystemMetricsForDpiLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected