mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Code cleanup.
This commit is contained in:
@ -1044,17 +1044,22 @@ ULONGLONG CSystem::GetTickCount64()
|
||||
**
|
||||
** This function is a wrapper function for LoadLibrary().
|
||||
**
|
||||
** Avoids loading a DLL from current directory.
|
||||
**
|
||||
*/
|
||||
HMODULE CSystem::RmLoadLibrary(LPCWSTR lpLibFileName, DWORD* dwError, bool ignoreErrors)
|
||||
{
|
||||
UINT oldMode;
|
||||
|
||||
if (ignoreErrors)
|
||||
{
|
||||
oldMode = SetErrorMode(0);
|
||||
SetErrorMode(oldMode | SEM_FAILCRITICALERRORS); // Prevent the system from displaying message box
|
||||
}
|
||||
|
||||
// Remove current directory from DLL search path
|
||||
SetDllDirectory(L"");
|
||||
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
HMODULE hLib = LoadLibrary(lpLibFileName);
|
||||
|
||||
|
Reference in New Issue
Block a user