[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

@ -20,6 +20,7 @@
#include "Litestep.h"
#include "Error.h"
#include "Rainmeter.h"
#include "System.h"
#include <shellapi.h>
#include <crtdbg.h>
#include <stdio.h>
@ -67,7 +68,7 @@ void ResetLoggingFlag()
void InitalizeLitestep()
{
// Use lsapi's methods instead of the stubs
HINSTANCE h = LoadLibrary(L"lsapi.dll");
HINSTANCE h = CSystem::RmLoadLibrary(L"lsapi.dll");
if (h != NULL)
{
fpAddBangCommand = (FPADDBANGCOMMAND)GetProcAddress(h, "AddBangCommand");