diff options
Diffstat (limited to 'c/defs.h')
-rw-r--r-- | c/defs.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -3,16 +3,26 @@ #include <memory> #include <optional> +#include <stdexcept> #include <windows.h> #include <commctrl.h> #include <SWI-Prolog.h> /* common.cpp */ TCHAR *TszFromSz(const char *, int); +struct Win32Error : public std::exception +{ + Win32Error(DWORD); + ~Win32Error(void); + virtual const char *what(void) const noexcept override; +private: + DWORD m_dwErr; + char *m_szMsg = NULL; +}; struct Library { Library(const TCHAR *); - ~Library(); + ~Library(void); FARPROC GetProcAddress(const char *); private: HMODULE m_hModule; @@ -70,7 +80,7 @@ int Plx(const char *, const char *); struct Query { Query(module_t ctx, predicate_t p, term_t t0); - ~Query(); + ~Query(void); int Cut(); int Close(); int NextSolution(); |