summaryrefslogtreecommitdiff
path: root/src/w32common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32common.h')
-rw-r--r--src/w32common.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/w32common.h b/src/w32common.h
index eb7faa1939a..bd01fd40401 100644
--- a/src/w32common.h
+++ b/src/w32common.h
@@ -81,6 +81,14 @@ get_proc_addr (HINSTANCE handle, LPCSTR fname)
} \
while (false)
+/* Load a function from the DLL, and don't fail if it does not exist. */
+#define LOAD_DLL_FN_OPT(lib, func) \
+ do \
+ { \
+ fn_##func = (W32_PFN_##func) get_proc_addr (lib, #func); \
+ } \
+ while (false)
+
#ifdef HAVE_HARFBUZZ
extern bool hbfont_init_w32_funcs (HMODULE);
#endif