From: Nikolay Sivov Subject: [PATCH 2/6] oleaut32/tests: Use RegisterTypeLibForUser() to run tmarshal tests. Message-Id: <20210917111253.2489914-2-nsivov@codeweavers.com> Date: Fri, 17 Sep 2021 14:12:49 +0300 In-Reply-To: <20210917111253.2489914-1-nsivov@codeweavers.com> References: <20210917111253.2489914-1-nsivov@codeweavers.com> Signed-off-by: Nikolay Sivov --- dlls/oleaut32/tests/tmarshal.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 1e75a93ebce..7c02c4f9bcb 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -1754,17 +1754,15 @@ static inline KindaEnum *impl_from_IKindaEnumWidget(IKindaEnumWidget *iface) static HRESULT register_current_module_typelib(void) { WCHAR path[MAX_PATH]; - CHAR pathA[MAX_PATH]; - HRESULT hr; ITypeLib *typelib; + HRESULT hr; - GetModuleFileNameA(NULL, pathA, MAX_PATH); - MultiByteToWideChar(CP_ACP, 0, pathA, -1, path, MAX_PATH); + GetModuleFileNameW(NULL, path, MAX_PATH); hr = LoadTypeLib(path, &typelib); if (SUCCEEDED(hr)) { - hr = RegisterTypeLib(typelib, path, NULL); + hr = RegisterTypeLibForUser(typelib, path, NULL); ITypeLib_Release(typelib); } return hr; @@ -3762,7 +3760,7 @@ START_TEST(tmarshal) test_external_connection(); test_marshal_dispinterface(); - hr = UnRegisterTypeLib(&LIBID_TestTypelib, 2, 5, LOCALE_NEUTRAL, + hr = UnRegisterTypeLibForUser(&LIBID_TestTypelib, 2, 5, LOCALE_NEUTRAL, sizeof(void*) == 8 ? SYS_WIN64 : SYS_WIN32); ok_ole_success(hr, UnRegisterTypeLib); -- 2.33.0