diff options
author | Tor Lillqvist <tml@src.gnome.org> | 2000-03-22 22:51:54 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2000-03-22 22:51:54 +0000 |
commit | dd781b91ec5322358cab4ff3e217b616cf2bc62b (patch) | |
tree | 0ebb9fe93eda51896decb7487557f6b2b975bd2c /gmodule | |
parent | 28bd47860b8129d76699d11796928fa148541036 (diff) | |
download | glib-dd781b91ec5322358cab4ff3e217b616cf2bc62b.tar.gz |
In the "null" module case _g_module_symbol should still first search the main
program before searching all the loaded DLLs.
Diffstat (limited to 'gmodule')
-rw-r--r-- | gmodule/ChangeLog | 3 | ||||
-rw-r--r-- | gmodule/gmodule-win32.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog index b40bbfd89..4be78001a 100644 --- a/gmodule/ChangeLog +++ b/gmodule/ChangeLog @@ -11,6 +11,9 @@ the latter on Win9x and Win2k. Check which one works, and use that. + First check for the symbol in the main program, and if not found + there, in all the modules. + Code for using PSAPI and Toolhelp was borrowed from the Dr. Mingw tool written by José Fonseca <em96115@fe.up.pt>. Thanks. diff --git a/gmodule/gmodule-win32.c b/gmodule/gmodule-win32.c index 6bcef9ff1..099f96a29 100644 --- a/gmodule/gmodule-win32.c +++ b/gmodule/gmodule-win32.c @@ -195,7 +195,10 @@ _g_module_symbol (gpointer handle, gpointer p; if (handle == null_module_handle) - p = find_in_any_module (symbol_name); + { + if ((p = GetProcAddress (GetModuleHandle (NULL), symbol_name)) == NULL) + p = find_in_any_module (symbol_name); + } else p = GetProcAddress (handle, symbol_name); |