1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Windows: Full UNICODE rewrite and implement support for UNICODE passwords.

This commit is contained in:
Mounir IDRASSI
2015-11-25 01:41:37 +01:00
parent ec7d96fcb7
commit 90bd57fe40
61 changed files with 3240 additions and 3239 deletions

View File

@@ -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<ITypeLib> 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];