aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2010-08-25 20:30:59 +0000
committerGerald Combs <gerald@wireshark.org>2010-08-25 20:30:59 +0000
commit607b228df6f1f754bf9bda6cfa21563913b1e7ff (patch)
tree6d1cf5c9dae154869fc6a13d181489834d7a190e /epan
parent43af5f6344d47af3ccfa574c1013dbc6a011904c (diff)
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 'epan')
-rw-r--r--epan/filesystem.c2
-rwxr-xr-xepan/wspython/wspy_libws.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c
index 2d15a9ca83..b5e149029f 100644
--- a/epan/filesystem.c
+++ b/epan/filesystem.c
@@ -282,7 +282,7 @@ init_progfile_dir(const char *arg0
* Attempt to get the full pathname of the currently running
* program.
*/
- if (GetModuleFileName(NULL, prog_pathname_w, G_N_ELEMENTS(prog_pathname_w)) != 0) {
+ if (GetModuleFileName(NULL, prog_pathname_w, G_N_ELEMENTS(prog_pathname_w)) != 0 && GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
/*
* XXX - Should we use g_utf16_to_utf8(), as in
* getenv_utf8()?
diff --git a/epan/wspython/wspy_libws.py b/epan/wspython/wspy_libws.py
index 1410f68d86..ed456f2741 100755
--- a/epan/wspython/wspy_libws.py
+++ b/epan/wspython/wspy_libws.py
@@ -27,6 +27,7 @@ import platform
__libwireshark = None
+/* XXX - We should probably return a full path here, at least on Windows. */
def get_libws_libname():
system = platform.system()
if system == "Darwin":