mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
[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:
@@ -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
|
||||
**
|
||||
|
Reference in New Issue
Block a user