+#if HAVE_WINDOWS_H && !defined(__MSDOS__)
+
+#include <windows.h>
+
+ObjectFile loadLibrary(fn)
+String fn; {
+ return LoadLibrary(fn);
+}
+
+void* lookupSymbol(file,symbol)
+ObjectFile file;
+String symbol; {
+ return GetProcAddress(file,symbol);
+}
+
+const char *dlerror(void)
+{
+ return "<unknown>";
+}
+
+void* getDLLSymbol(dll,symbol) /* load dll and lookup symbol */
+String dll;
+String symbol; {
+ ObjectFile instance = LoadLibrary(dll);
+ if (NULL == instance) {
+ /* GetLastError allegedly provides more detail - in practice,
+ * it tells you nothing more.
+ */
+ ERRMSG(0) "Error while importing DLL \"%s\"", dll
+ EEND;
+ }
+ return GetProcAddress(instance,symbol);
+}
+
+#elif HAVE_DLFCN_H /* eg LINUX, SOLARIS, ULTRIX */