[vlc-devel] commit: Win32:use Unicode LoadLibrary ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Sep 17 06:49:40 CEST 2008


vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Sep 16 23:20:41 2008 +0300| [cbfba6f0f85f813917e408140fe1eb91490f56cf] | committer: Jean-Baptiste Kempf 

Win32:use Unicode LoadLibrary

so we can install VLC in non-ANSI-named directories
(cherry picked from commit 7718f129a12f4b3cf778f8c29aca26e7636ca035)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cbfba6f0f85f813917e408140fe1eb91490f56cf
---

 src/modules/os.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/modules/os.c b/src/modules/os.c
index 5cf3a82..213d5ae 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 )
     {




More information about the vlc-devel mailing list