mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
From Ned Harding: Basic implementation of dflcn header for win32
This commit is contained in:
24
src/win32/dlfcn.h
Normal file
24
src/win32/dlfcn.h
Normal file
@@ -0,0 +1,24 @@
|
||||
// VERY simplistic implementation of dlfcn.h for win32 since it isn't a standard header on windows
|
||||
|
||||
#ifndef DLFCN_H
|
||||
#define DLFCN_H
|
||||
|
||||
#define RTLD_NOW 2
|
||||
|
||||
|
||||
void *dlopen (const char *file, int /*mode*/)
|
||||
{
|
||||
return LoadLibraryA(file);
|
||||
}
|
||||
|
||||
int dlclose (void *handle)
|
||||
{
|
||||
return FreeLibrary((HINSTANCE)handle)==0 ? 0 : -1;
|
||||
}
|
||||
|
||||
void *dlsym (void *handle, const char *name)
|
||||
{
|
||||
return (void *)GetProcAddress((HINSTANCE)handle, name);
|
||||
}
|
||||
|
||||
#endif // DLFCN_H
|
||||
Reference in New Issue
Block a user