1
0
Fork 0

Merge pull request #3219 from ZehMatt/plugin-dirs

Add support for plugins in sub directories
This commit is contained in:
Duncan Ogilvie 2023-10-01 22:38:42 +02:00 committed by GitHub
commit bba369d607
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 367 additions and 214 deletions

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,6 @@ struct PLUG_DATA
{
char plugpath[MAX_PATH];
char plugname[MAX_PATH];
bool isLoaded;
HINSTANCE hPlugin;
PLUGINIT pluginit;
PLUGSTOP plugstop;
@ -67,7 +66,7 @@ struct PLUG_FORMATFUNCTION
};
//plugin management functions
bool pluginload(const char* pluginname, bool loadall = false);
bool pluginload(const char* pluginname);
bool pluginunload(const char* pluginname, bool unloadall = false);
void pluginloadall(const char* pluginDir);
void pluginunloadall();

View File

@ -319,7 +319,7 @@ static VOID CALLBACK MyLdrDllNotification(
typedef BOOL(WINAPI* pfnSetDefaultDllDirectories)(DWORD DirectoryFlags);
typedef BOOL(WINAPI* pfnSetDllDirectoryW)(LPCWSTR lpPathName);
typedef BOOL(WINAPI* pfnAddDllDirectory)(LPCWSTR lpPathName);
typedef PVOID(WINAPI* pfnAddDllDirectory)(LPCWSTR lpPathName);
static pfnSetDefaultDllDirectories pSetDefaultDllDirectories;
static pfnSetDllDirectoryW pSetDllDirectoryW;