--- truecrypt/setup/comsetup.cpp 2018/04/24 16:47:41 1.1.1.2 +++ truecrypt/setup/comsetup.cpp 2018/04/24 16:51:14 1.1.1.4 @@ -1,7 +1,7 @@ /* - Copyright (c) TrueCrypt Foundation. All rights reserved. + Copyright (c) 2007 TrueCrypt Foundation. All rights reserved. - Covered by the TrueCrypt License 2.3 the full text of which is contained + Governed by the TrueCrypt License 2.4 the full text of which is contained in the file License.txt included in TrueCrypt binary and source code distribution packages. */ @@ -24,8 +24,8 @@ extern "C" BOOL RegisterComServers (char wsprintfW (mainModule, L"%hsTrueCrypt.exe", modulePath); wsprintfW (formatModule, L"%hsTrueCrypt Format.exe", modulePath); - UnRegisterTypeLib (LIBID_TrueCrypt, 1, 0, 0, SYS_WIN32); - UnRegisterTypeLib (LIBID_TrueCryptFormat, 1, 0, 0, SYS_WIN32); + UnRegisterTypeLib (LIBID_TrueCryptMainCom, 1, 0, 0, SYS_WIN32); + UnRegisterTypeLib (LIBID_TrueCryptFormatCom, 1, 0, 0, SYS_WIN32); CRegObject ro; ro.FinalConstruct (); @@ -34,7 +34,7 @@ extern "C" BOOL RegisterComServers (char ro.AddReplacement (L"FORMAT_MODULE", formatModule); wchar_t setupModule[MAX_PATH]; - GetModuleFileNameW (NULL, setupModule, sizeof (setupModule)); + GetModuleFileNameW (NULL, setupModule, sizeof (setupModule) / sizeof (setupModule[0])); if (ro.ResourceRegister (setupModule, IDR_COMREG, L"REGISTRY") != S_OK) goto error; @@ -57,23 +57,23 @@ extern "C" BOOL UnregisterComServers (ch { BOOL ret; - if (UnRegisterTypeLib (LIBID_TrueCrypt, 1, 0, 0, SYS_WIN32) != S_OK) + if (UnRegisterTypeLib (LIBID_TrueCryptMainCom, 1, 0, 0, SYS_WIN32) != S_OK) return FALSE; - if (UnRegisterTypeLib (LIBID_TrueCryptFormat, 1, 0, 0, SYS_WIN32) != S_OK) + if (UnRegisterTypeLib (LIBID_TrueCryptFormatCom, 1, 0, 0, SYS_WIN32) != S_OK) return FALSE; wchar_t module[1024]; CRegObject ro; ro.FinalConstruct (); - wsprintfW (module, L"%hs\\TrueCrypt.exe", modulePath); + wsprintfW (module, L"%hsTrueCrypt.exe", modulePath); ro.AddReplacement (L"MAIN_MODULE", module); - wsprintfW (module, L"%hs\\TrueCrypt Format.exe", modulePath); + wsprintfW (module, L"%hsTrueCrypt Format.exe", modulePath); ro.AddReplacement (L"FORMAT_MODULE", module); wchar_t setupModule[MAX_PATH]; - GetModuleFileNameW (NULL, setupModule, sizeof (setupModule)); + GetModuleFileNameW (NULL, setupModule, sizeof (setupModule) / sizeof (setupModule[0])); ret = ro.ResourceUnregister (setupModule, IDR_COMREG, L"REGISTRY") == S_OK;