[PATCH 2/6] oleaut32/tests: Use RegisterTypeLibForUser() to run tmarshal tests.
Nikolay Sivov
nsivov at codeweavers.com
Fri Sep 17 06:12:49 CDT 2021
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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
More information about the wine-devel
mailing list