diff options
Diffstat (limited to 'src/libs/7zip/unix/CPP/Windows/DLL.h')
-rw-r--r-- | src/libs/7zip/unix/CPP/Windows/DLL.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/libs/7zip/unix/CPP/Windows/DLL.h b/src/libs/7zip/unix/CPP/Windows/DLL.h index 9b57bec8a..2e044ec59 100644 --- a/src/libs/7zip/unix/CPP/Windows/DLL.h +++ b/src/libs/7zip/unix/CPP/Windows/DLL.h @@ -6,7 +6,7 @@ #include "../Common/MyString.h" typedef void * HMODULE; - +// #define LOAD_LIBRARY_AS_DATAFILE 0 typedef int (*FARPROC)(); namespace NWindows { @@ -14,17 +14,14 @@ namespace NDLL { class CLibrary { - bool LoadOperations(HMODULE newModule); HMODULE _module; public: + CLibrary(): _module(NULL) {}; + ~CLibrary() { Free(); } + operator HMODULE() const { return _module; } HMODULE* operator&() { return &_module; } - - - CLibrary():_module(NULL) {}; - ~CLibrary(); - - bool Free(); + bool IsLoaded() const { return (_module != NULL); }; void Attach(HMODULE m) { @@ -38,11 +35,16 @@ public: return m; } - - bool Load(LPCTSTR fileName); - FARPROC GetProc(LPCSTR procName) const; + bool Free(); + // bool LoadEx(CFSTR path, DWORD flags = LOAD_LIBRARY_AS_DATAFILE); + bool Load(CFSTR path); + FARPROC GetProc(LPCSTR procName) const; // { return My_GetProcAddress(_module, procName); } }; +bool MyGetModuleFileName(FString &path); + +FString GetModuleDirPrefix(); + }} #endif |