diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-15 00:39:07 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-15 00:39:07 +0200 |
commit | 0e22414d042207269f916298b236f1be341ddeea (patch) | |
tree | c7f57ee6882eda6d9a59712f9da753120086bc9e /c/defs.h | |
parent | 31c03c4ddba65199c8c444c75b684b6cfaa629d9 (diff) | |
download | EpisodeBrowser-0e22414d042207269f916298b236f1be341ddeea.tar.gz |
Add wrapper for LoadLibrary, FreeLibrary.
Diffstat (limited to 'c/defs.h')
-rw-r--r-- | c/defs.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1,12 +1,22 @@ #ifndef DEFS_H #define DEFS_H +#include <memory> #include <windows.h> #include <commctrl.h> #include <SWI-Prolog.h> /* common.cpp */ TCHAR *TszFromSz(const char *, int); +class Library { +private: + HMODULE m_hModule; +public: + static std::unique_ptr<Library> Load(const TCHAR *); + Library(const TCHAR *); + ~Library(); + FARPROC GetProcAddress(const char *); +}; /* main.cpp */ void UpdateLayout(); @@ -61,6 +71,12 @@ int Plp(term_t, const char *, ...); int Plg(term_t, const char *, ...); /* defs.h */ +#ifdef UNICODE +#define WA "W" +#else +#define WA "A" +#endif + #define DLVSIKEY 0 #define DLVSIVALUE 1 #define ELVSIEPISODE 0 |