summaryrefslogtreecommitdiff
path: root/src/w32.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32.h')
-rw-r--r--src/w32.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/w32.h b/src/w32.h
index e0aedcbffa2..18e12b2458c 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -225,4 +225,17 @@ extern ssize_t emacs_gnutls_push (gnutls_transport_ptr_t p,
const void* buf, size_t sz);
#endif /* HAVE_GNUTLS */
+/* Definine a function that will be loaded from a DLL. */
+#define DEF_DLL_FN(type, func, args) static type (FAR CDECL *fn_##func) args
+
+/* Load a function from the DLL. */
+#define LOAD_DLL_FN(lib, func) \
+ do \
+ { \
+ fn_##func = (void *) GetProcAddress (lib, #func); \
+ if (!fn_##func) \
+ return false; \
+ } \
+ while (false)
+
#endif /* EMACS_W32_H */