[Application]

- Added some codes to avoid loading a dll from current directory.

[Library]
- Added new functions to avoid loading a dll from current directory. (CSystem::RmSetDllDirectory(), CSystem::RmLoadLibrary())
This commit is contained in:
spx
2010-09-11 19:39:45 +00:00
parent 3aa4673019
commit 3da0aa3f4c
11 changed files with 252 additions and 82 deletions

View File

@@ -1300,11 +1300,12 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
tmpName[0] = L'\0';
}
m_Path = tmpName;
if(!c_DummyLitestep) InitalizeLitestep();
bool bDefaultIniLocation = false;
m_Path = tmpName;
if (c_CmdLine.empty())
{
m_IniFile = m_Path + L"Rainmeter.ini";
@@ -3187,38 +3188,6 @@ void CRainmeter::ResetStats()
CMeasureNet::ResetStats();
}
/*
** IsNT
**
** Checks which OS you are running
**
*/
PLATFORM CRainmeter::IsNT()
{
// Check if you are running a real OS
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if(!GetVersionEx((OSVERSIONINFO*)&osvi))
{
// Something's wrong, lets assime Win9x
return PLATFORM_9X;
}
if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
// You got NT
if(osvi.dwMajorVersion <= 4) return PLATFORM_NT4;
if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) return PLATFORM_2K;
return PLATFORM_XP;
}
return PLATFORM_9X; // Wintendo alert!
}
/*
** ShowContextMenu
**