| 454 | } |
| 455 | |
| 456 | static 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 */ |
| 473 | static void ASleep(DWORD duration_ms) |
no outgoing calls
no test coverage detected