diff options
author | Gerald Combs <gerald@wireshark.org> | 2010-08-25 20:30:59 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2010-08-25 20:30:59 +0000 |
commit | 607b228df6f1f754bf9bda6cfa21563913b1e7ff (patch) | |
tree | 6d1cf5c9dae154869fc6a13d181489834d7a190e /capture-wpcap.c | |
parent | 43af5f6344d47af3ccfa574c1013dbc6a011904c (diff) | |
download | wireshark-607b228df6f1f754bf9bda6cfa21563913b1e7ff.tar.gz |
Add ws_load_library and ws_module_open, which respectively call
LoadLibrary and g_module_open only for the program directory and system
directory on Windows. Use them to replace a bunch of LoadLibrary and
g_module_open calls. Use the extension ".dll" for all the DLLs that we
load. Add comments about DLL loading in Python.
svn path=/trunk/; revision=33924
Diffstat (limited to 'capture-wpcap.c')
-rw-r--r-- | capture-wpcap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/capture-wpcap.c b/capture-wpcap.c index dbdbc9047f..2cda325136 100644 --- a/capture-wpcap.c +++ b/capture-wpcap.c @@ -36,6 +36,8 @@ #include "capture-pcap-util.h" #include "capture-pcap-util-int.h" +#include <wsutil/file_util.h> + /* XXX - yes, I know, I should move cppmagic.h to a generic location. */ #include "tools/lemon/cppmagic.h" @@ -183,7 +185,7 @@ load_wpcap(void) GModule *wh; /* wpcap handle */ const symbol_table_t *sym; - wh = g_module_open("wpcap", 0); + wh = ws_module_open("wpcap.dll", 0); if (!wh) { return; @@ -849,7 +851,7 @@ get_runtime_pcap_version(GString *str) */ if (packetVer == NULL) { packetVer = "version unknown"; - handle = g_module_open("Packet.dll", 0); + handle = ws_module_open("packet.dll", 0); if (handle != NULL) { if (g_module_symbol(handle, "PacketLibraryVersion", |