diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-28 21:22:23 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-28 21:22:23 +0000 |
commit | 7fac1903b890dcf899cc0c18a1b5f9e0198b58ab (patch) | |
tree | 0c13b60ba236c0cc850f3c339a0c339d6e75c44f /win32/dl_win32.xs | |
parent | 2692f720225eadd5a0dcbb17c23107401470624b (diff) | |
download | perl-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.xs | 12 |
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)); |