BOOL WINAPI SFileDestroy_stub() { LoadSFMpqDll(); if (hSFMpq) { *(FARPROC *)&SFileDestroy = GetProcAddress(hSFMpq,"SFileDestroy"); if (SFileDestroy) return SFileDestroy(); } return FALSE; }
STORMMODULE::STORMMODULE() { if (hStorm!=0) return; const char STORM_DLL[] = "Storm.dll"; hStorm = GetModuleHandle(STORM_DLL); if (hStorm == NULL) hStorm = LoadLibrary(STORM_DLL); else AlreadyLoaded=TRUE; LoadStormFunctions(); if (SFileDestroy && !AlreadyLoaded) SFileDestroy(); }
HINSTANCE LoadStorm(char * DllFileName) { FreeStorm(); if (hStorm!=0) return 0; hStorm = GetModuleHandle(DllFileName); if (hStorm == NULL) hStorm = LoadLibrary(DllFileName); else AlreadyLoaded=TRUE; LoadStormFunctions(); if (SFileDestroy && !AlreadyLoaded) SFileDestroy(); if (AlreadyLoaded==TRUE) return 0; return hStorm; }