aboutsummaryrefslogtreecommitdiff
path: root/c/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/defs.h')
-rw-r--r--c/defs.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/c/defs.h b/c/defs.h
index 5a6a25a..102dce2 100644
--- a/c/defs.h
+++ b/c/defs.h
@@ -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();