summaryrefslogtreecommitdiff
path: root/win32/dl_win32.xs
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-28 21:22:23 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-28 21:22:23 +0000
commit7fac1903b890dcf899cc0c18a1b5f9e0198b58ab (patch)
tree0c13b60ba236c0cc850f3c339a0c339d6e75c44f /win32/dl_win32.xs
parent2692f720225eadd5a0dcbb17c23107401470624b (diff)
downloadperl-7fac1903b890dcf899cc0c18a1b5f9e0198b58ab.tar.gz
add wide versions of win32 system calls (first step in
globalization); delayload winsock for performance if compiling with VC 6.0 p4raw-id: //depot/perl@3501
Diffstat (limited to 'win32/dl_win32.xs')
-rw-r--r--win32/dl_win32.xs12
1 files changed, 10 insertions, 2 deletions
diff --git a/win32/dl_win32.xs b/win32/dl_win32.xs
index 3473520372..8a91973fe2 100644
--- a/win32/dl_win32.xs
+++ b/win32/dl_win32.xs
@@ -102,9 +102,17 @@ dl_load_file(filename,flags=0)
int flags
PREINIT:
CODE:
+ WCHAR wfilename[MAX_PATH];
DLDEBUG(1,PerlIO_printf(PerlIO_stderr(),"dl_load_file(%s):\n", filename));
- if (dl_static_linked(filename) == 0)
- RETVAL = (void*) LoadLibraryEx(filename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH ) ;
+ if (dl_static_linked(filename) == 0) {
+ if (USING_WIDE()) {
+ A2WHELPER(filename, wfilename, sizeof(wfilename), GETINTERPMODE());
+ RETVAL = (void*) LoadLibraryExW(wfilename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
+ }
+ else {
+ RETVAL = (void*) LoadLibraryExA(filename, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
+ }
+ }
else
RETVAL = (void*) GetModuleHandle(NULL);
DLDEBUG(2,PerlIO_printf(PerlIO_stderr()," libref=%x\n", RETVAL));