summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-20 02:50:35 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-20 02:50:35 +0000
commit123cbbb40bdf4c0f28d1cc119d97667f70f299f3 (patch)
tree61c365064be27451792cb7d4246fbe05a8a5f9e3 /win32
parent3878625118db6a48d9a6e00ced2a13904510d922 (diff)
downloadperl-123cbbb40bdf4c0f28d1cc119d97667f70f299f3.tar.gz
intuit @INC pathnames from exe location only if dll location
is unknown (ensures that multiple executables will coexist) p4raw-id: //depot/perl@1158
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 9afb0bd687..68b6bb8962 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -202,7 +202,9 @@ get_emd_part(char *prev_path, char *trailing_path, ...)
va_start(ap, trailing_path);
strip = va_arg(ap, char *);
- GetModuleFileName(GetModuleHandle(NULL), mod_name, sizeof(mod_name));
+ GetModuleFileName((w32_perldll_handle == INVALID_HANDLE_VALUE)
+ ? GetModuleHandle(NULL)
+ : w32_perldll_handle, mod_name, sizeof(mod_name));
ptr = strrchr(mod_name, '\\');
while (ptr && strip) {
/* look for directories to skip back */