From 90bd57fe40e66fc829ecb01482d32d604b0df19c Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 25 Nov 2015 01:41:37 +0100 Subject: Windows: Full UNICODE rewrite and implement support for UNICODE passwords. --- src/Setup/ComSetup.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Setup/ComSetup.cpp') diff --git a/src/Setup/ComSetup.cpp b/src/Setup/ComSetup.cpp index 96bf42b4..3a3687db 100644 --- a/src/Setup/ComSetup.cpp +++ b/src/Setup/ComSetup.cpp @@ -27,14 +27,14 @@ #include "../Format/FormatCom_i.c" -extern "C" BOOL RegisterComServers (char *modulePath) +extern "C" BOOL RegisterComServers (wchar_t *modulePath) { BOOL ret = TRUE; wchar_t mainModule[1024], formatModule[1024]; CComPtr tl, tl2; - wsprintfW (mainModule, L"%hsVeraCrypt.exe", modulePath); - wsprintfW (formatModule, L"%hsVeraCrypt Format.exe", modulePath); + wsprintfW (mainModule, L"%sVeraCrypt.exe", modulePath); + wsprintfW (formatModule, L"%sVeraCrypt Format.exe", modulePath); UnRegisterTypeLib (LIBID_TrueCryptMainCom, TC_MAIN_COM_VERSION_MAJOR, TC_MAIN_COM_VERSION_MINOR, 0, SYS_WIN32); UnRegisterTypeLib (LIBID_TrueCryptFormatCom, TC_FORMAT_COM_VERSION_MAJOR, TC_FORMAT_COM_VERSION_MINOR, 0, SYS_WIN32); @@ -58,7 +58,7 @@ extern "C" BOOL RegisterComServers (char *modulePath) || !SUCCEEDED (r = LoadTypeLib (formatModule, &tl2)) || !SUCCEEDED (r = RegisterTypeLib (tl2, formatModule, 0))) { - MessageBox (MainDlg, _com_error (r).ErrorMessage(), TC_APP_NAME, MB_ICONERROR); + MessageBox (MainDlg, _com_error (r).ErrorMessage(), _T(TC_APP_NAME), MB_ICONERROR); ret = FALSE; } @@ -67,7 +67,7 @@ extern "C" BOOL RegisterComServers (char *modulePath) } -extern "C" BOOL UnregisterComServers (char *modulePath) +extern "C" BOOL UnregisterComServers (wchar_t *modulePath) { BOOL ret; @@ -85,10 +85,10 @@ extern "C" BOOL UnregisterComServers (char *modulePath) CRegObject ro; ro.FinalConstruct (); - wsprintfW (module, L"%hsVeraCrypt.exe", modulePath); + wsprintfW (module, L"%sVeraCrypt.exe", modulePath); ro.AddReplacement (L"MAIN_MODULE", module); - wsprintfW (module, L"%hsVeraCrypt Format.exe", modulePath); + wsprintfW (module, L"%sVeraCrypt Format.exe", modulePath); ro.AddReplacement (L"FORMAT_MODULE", module); wchar_t setupModule[MAX_PATH]; -- cgit v1.2.3