* Plugin support for Win32.
git-svn-id: svn://svn.zoy.org/elk/trunk@150 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
@@ -92,6 +92,19 @@ void Dlopen_File (char *fn) {
|
||||
|
||||
/* NSUnLinkModule (handle, FALSE); */
|
||||
|
||||
#elif defined(WIN32)
|
||||
void *handle;
|
||||
|
||||
if (Verb_Load)
|
||||
printf ("[dll %s]\n", fn);
|
||||
|
||||
handle = LoadLibrary (fn);
|
||||
|
||||
if (handle == NULL) {
|
||||
Primitive_Error ("LoadLibrary failed on ~%~s",
|
||||
Make_String (fn, strlen (fn)));
|
||||
}
|
||||
|
||||
#elif defined(HAVE_DL_DLOPEN)
|
||||
void *handle;
|
||||
|
||||
@@ -140,6 +153,9 @@ void Dlopen_File (char *fn) {
|
||||
if (sym)
|
||||
sp->value = (unsigned long int)(intptr_t)NSAddressOfSymbol (sym);
|
||||
|
||||
#elif defined(WIN32)
|
||||
sp->value = (void *)GetProcAddress (handle, (MYCHAR *)sym);
|
||||
|
||||
#elif defined(HAVE_DL_DLOPEN)
|
||||
/* dlsym() may fail for symbols not exported by object file;
|
||||
* this can be safely ignored. */
|
||||
|
||||
Reference in New Issue
Block a user