From 0e22414d042207269f916298b236f1be341ddeea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 15 Jul 2022 00:39:07 +0200 Subject: Add wrapper for LoadLibrary, FreeLibrary. --- c/defs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'c/defs.h') diff --git a/c/defs.h b/c/defs.h index c557320..c83dd8c 100644 --- a/c/defs.h +++ b/c/defs.h @@ -1,12 +1,22 @@ #ifndef DEFS_H #define DEFS_H +#include #include #include #include /* common.cpp */ TCHAR *TszFromSz(const char *, int); +class Library { +private: + HMODULE m_hModule; +public: + static std::unique_ptr 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 -- cgit v1.2.3