From: Rémi Denis-Courmont Date: Tue, 16 Sep 2008 20:20:41 +0000 (+0300) Subject: Win32:use Unicode LoadLibrary X-Git-Tag: 1.0.0-pre1~3218 X-Git-Url: https://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=commitdiff_plain;h=7718f129a12f4b3cf778f8c29aca26e7636ca035;ds=inline Win32:use Unicode LoadLibrary so we can install VLC in non-ANSI-named directories --- diff --git a/src/modules/os.c b/src/modules/os.c index af70b6968e..17f033b7f2 100644 --- a/src/modules/os.c +++ b/src/modules/os.c @@ -180,14 +180,13 @@ int module_Load( vlc_object_t *p_this, const char *psz_file, } #elif defined(HAVE_DL_WINDOWS) + wchar_t psz_wfile[MAX_PATH]; + MultiByteToWideChar( CP_ACP, 0, psz_file, -1, psz_wfile, MAX_PATH ); + #ifdef UNDER_CE - { - wchar_t psz_wfile[MAX_PATH]; - MultiByteToWideChar( CP_ACP, 0, psz_file, -1, psz_wfile, MAX_PATH ); - handle = LoadLibrary( psz_wfile ); - } + handle = LoadLibrary( psz_wfile ); #else - handle = LoadLibrary( psz_file ); + handle = LoadLibraryW( psz_wfile ); #endif if( handle == NULL ) {