Index: src/OFDate.m ================================================================== --- src/OFDate.m +++ src/OFDate.m @@ -316,11 +316,11 @@ mutex = [[OFMutex alloc] init]; atexit(releaseMutex); #endif #ifdef OF_WINDOWS - if ((module = LoadLibrary("msvcrt.dll")) != NULL) + if ((module = GetModuleHandle("msvcrt.dll")) != NULL) _mktime64FuncPtr = (__time64_t (*)(struct tm *)) GetProcAddress(module, "_mktime64"); #endif } Index: src/OFFileIRIHandler.m ================================================================== --- src/OFFileIRIHandler.m +++ src/OFFileIRIHandler.m @@ -642,15 +642,15 @@ readdirMutex = [[OFMutex alloc] init]; atexit(releaseReaddirMutex); #endif #ifdef OF_WINDOWS - if ((module = LoadLibrary("msvcrt.dll")) != NULL) + if ((module = GetModuleHandle("msvcrt.dll")) != NULL) _wutime64FuncPtr = (int (*)(const wchar_t *, struct __utimbuf64 *))GetProcAddress(module, "_wutime64"); - if ((module = LoadLibrary("kernel32.dll")) != NULL) { + if ((module = GetModuleHandleA("kernel32.dll")) != NULL) { createSymbolicLinkWFuncPtr = (WINAPI BOOLEAN (*)(LPCWSTR, LPCWSTR, DWORD)) GetProcAddress(module, "CreateSymbolicLinkW"); createHardLinkWFuncPtr = (WINAPI BOOLEAN (*)(LPCWSTR, LPCWSTR, Index: src/platform/Windows/OFSystemInfo+NetworkInterfaces.m ================================================================== --- src/platform/Windows/OFSystemInfo+NetworkInterfaces.m +++ src/platform/Windows/OFSystemInfo+NetworkInterfaces.m @@ -36,11 +36,11 @@ static void init(void) { HMODULE module; - if ((module = LoadLibrary("iphlpapi.dll")) != NULL) + if ((module = GetModuleHandle("iphlpapi.dll")) != NULL) GetAdaptersAddressesFuncPtr = (WINAPI ULONG (*)(ULONG, ULONG, PVOID, PIP_ADAPTER_ADDRESSES, PULONG)) GetProcAddress(module, "GetAdaptersAddresses"); }