msi: Unicode and ANSI global UI handlers are mutually exclusive.
This commit is contained in:
parent
4b5248c9e0
commit
90fa4fe155
|
@ -1905,8 +1905,9 @@ INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
|
||||||
TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext);
|
TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext);
|
||||||
|
|
||||||
gUIHandlerA = puiHandler;
|
gUIHandlerA = puiHandler;
|
||||||
gUIFilter = dwMessageFilter;
|
gUIHandlerW = NULL;
|
||||||
gUIContext = pvContext;
|
gUIFilter = dwMessageFilter;
|
||||||
|
gUIContext = pvContext;
|
||||||
|
|
||||||
return prev;
|
return prev;
|
||||||
}
|
}
|
||||||
|
@ -1918,9 +1919,10 @@ INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler,
|
||||||
|
|
||||||
TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext);
|
TRACE("%p %08x %p\n", puiHandler, dwMessageFilter, pvContext);
|
||||||
|
|
||||||
|
gUIHandlerA = NULL;
|
||||||
gUIHandlerW = puiHandler;
|
gUIHandlerW = puiHandler;
|
||||||
gUIFilter = dwMessageFilter;
|
gUIFilter = dwMessageFilter;
|
||||||
gUIContext = pvContext;
|
gUIContext = pvContext;
|
||||||
|
|
||||||
return prev;
|
return prev;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6871,6 +6871,39 @@ static void test_file_in_use_cab(void)
|
||||||
delete_test_files();
|
delete_test_files();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
INT CALLBACK handler_a(LPVOID context, UINT type, LPCSTR msg) { return IDOK; };
|
||||||
|
INT CALLBACK handler_w(LPVOID context, UINT type, LPCWSTR msg) { return IDOK; };
|
||||||
|
|
||||||
|
static void test_MsiSetExternalUI(void)
|
||||||
|
{
|
||||||
|
INSTALLUI_HANDLERA ret_a;
|
||||||
|
INSTALLUI_HANDLERW ret_w;
|
||||||
|
|
||||||
|
ret_a = MsiSetExternalUIA(handler_a, INSTALLLOGMODE_ERROR, NULL);
|
||||||
|
ok(ret_a == NULL, "expected NULL, got %p\n", ret_a);
|
||||||
|
|
||||||
|
ret_a = MsiSetExternalUIA(NULL, 0, NULL);
|
||||||
|
ok(ret_a == handler_a, "expected %p, got %p\n", handler_a, ret_a);
|
||||||
|
|
||||||
|
ret_w = MsiSetExternalUIW(handler_w, INSTALLLOGMODE_ERROR, NULL);
|
||||||
|
ok(ret_w == NULL, "expected NULL, got %p\n", ret_w);
|
||||||
|
|
||||||
|
ret_w = MsiSetExternalUIW(NULL, 0, NULL);
|
||||||
|
ok(ret_w == handler_w, "expected %p, got %p\n", handler_w, ret_w);
|
||||||
|
|
||||||
|
ret_a = MsiSetExternalUIA(handler_a, INSTALLLOGMODE_ERROR, NULL);
|
||||||
|
ok(ret_a == NULL, "expected NULL, got %p\n", ret_a);
|
||||||
|
|
||||||
|
ret_w = MsiSetExternalUIW(handler_w, INSTALLLOGMODE_ERROR, NULL);
|
||||||
|
ok(ret_w == NULL, "expected NULL, got %p\n", ret_w);
|
||||||
|
|
||||||
|
ret_a = MsiSetExternalUIA(NULL, 0, NULL);
|
||||||
|
ok(ret_a == NULL, "expected NULL, got %p\n", ret_a);
|
||||||
|
|
||||||
|
ret_w = MsiSetExternalUIW(NULL, 0, NULL);
|
||||||
|
ok(ret_w == NULL, "expected NULL, got %p\n", ret_w);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(install)
|
START_TEST(install)
|
||||||
{
|
{
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
@ -6959,6 +6992,7 @@ START_TEST(install)
|
||||||
test_installed_prop();
|
test_installed_prop();
|
||||||
test_file_in_use();
|
test_file_in_use();
|
||||||
test_file_in_use_cab();
|
test_file_in_use_cab();
|
||||||
|
test_MsiSetExternalUI();
|
||||||
|
|
||||||
DeleteFileA(log_file);
|
DeleteFileA(log_file);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue