#ifndef DLL_H #define DLL_H /* make sure WIN32 is defined when building in a Windows environment */ #if defined(__MINGW32__) && !defined(WIN32) #define WIN32 #endif #ifdef WIN32 #include typedef HMODULE dll_handle_t; #else #include typedef void *dll_handle_t; #endif int dll_open(dll_handle_t *h, const char *filename); void dll_close(dll_handle_t h); void *dll_func(dll_handle_t h, const char *name); #endif