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:
@ -24,6 +24,20 @@
|
||||
#include <windows.h>
|
||||
#include <vector>
|
||||
|
||||
typedef BOOL (WINAPI *FPSETDLLDIRECTORYW)(LPCWSTR lpPathName);
|
||||
|
||||
enum OSPLATFORM
|
||||
{
|
||||
OSPLATFORM_UNKNOWN = 0,
|
||||
OSPLATFORM_9X,
|
||||
OSPLATFORM_NT4,
|
||||
OSPLATFORM_2K,
|
||||
OSPLATFORM_XP,
|
||||
OSPLATFORM_XP_SP1,
|
||||
OSPLATFORM_VISTA,
|
||||
OSPLATFORM_7
|
||||
};
|
||||
|
||||
struct MONITOR_INFO
|
||||
{
|
||||
bool active;
|
||||
@ -64,6 +78,12 @@ public:
|
||||
static HWND GetHelperWindow() { return c_HelperWindow; }
|
||||
static void PrepareHelperWindow(HWND WorkerW);
|
||||
|
||||
static bool IsNT() { return (GetOSPlatform() >= OSPLATFORM_NT4); }
|
||||
static OSPLATFORM GetOSPlatform();
|
||||
|
||||
static BOOL RmSetDllDirectory(LPCWSTR lpPathName);
|
||||
static HMODULE RmLoadLibrary(LPCWSTR lpLibFileName, DWORD* dwError = NULL, bool ignoreErrors = false);
|
||||
|
||||
static bool CopyFiles(const std::wstring& strFrom, const std::wstring& strTo, bool bMove = false);
|
||||
static bool RemoveFile(const std::wstring& file);
|
||||
|
||||
@ -94,6 +114,10 @@ private:
|
||||
|
||||
static bool c_DwmCompositionEnabled;
|
||||
static bool c_ShowDesktop;
|
||||
|
||||
static OSPLATFORM c_Platform;
|
||||
|
||||
static FPSETDLLDIRECTORYW c_SetDllDirectoryW;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user