#include "utils/dynamic_loader.h"
Go to the source code of this file.
Defines | |
#define | pg_dlopen(f) dlopen((f), 1) |
#define | pg_dlsym dlsym |
#define | pg_dlclose dlclose |
#define | pg_dlerror dlerror |
Functions | |
char * | dlerror (void) |
int | dlclose (void *handle) |
void * | dlsym (void *handle, const char *symbol) |
void * | dlopen (const char *path, int mode) |
int dlclose | ( | void * | handle | ) |
Definition at line 41 of file win32.c.
References last_dyn_error, and set_dl_error().
Referenced by BSD44_derived_dlclose().
{ if (!FreeLibrary((HMODULE) handle)) { set_dl_error(); return 1; } last_dyn_error[0] = 0; return 0; }
char* dlerror | ( | void | ) |
Definition at line 32 of file win32.c.
References last_dyn_error.
Referenced by BSD44_derived_dlopen().
{ if (last_dyn_error[0]) return last_dyn_error; else return NULL; }
void* dlopen | ( | const char * | path, | |
int | mode | |||
) |
Definition at line 68 of file win32.c.
References last_dyn_error, and set_dl_error().
Referenced by BSD44_derived_dlopen().
{ HMODULE h; int prevmode; /* Disable popup error messages when loading DLLs */ prevmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); h = LoadLibrary(path); SetErrorMode(prevmode); if (!h) { set_dl_error(); return NULL; } last_dyn_error[0] = 0; return (void *) h; }
void* dlsym | ( | void * | handle, | |
const char * | symbol | |||
) |
Definition at line 53 of file win32.c.
References last_dyn_error, and set_dl_error().
Referenced by BSD44_derived_dlsym().
{ void *ptr; ptr = GetProcAddress((HMODULE) handle, symbol); if (!ptr) { set_dl_error(); return NULL; } last_dyn_error[0] = 0; return ptr; }