Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/windows.gaming.input/tests/Makefile.in | 2 +- dlls/windows.gaming.input/tests/input.c | 50 +++++---------------- 2 files changed, 11 insertions(+), 41 deletions(-)
diff --git a/dlls/windows.gaming.input/tests/Makefile.in b/dlls/windows.gaming.input/tests/Makefile.in index 7fce9b04551..88e1c05fbcf 100644 --- a/dlls/windows.gaming.input/tests/Makefile.in +++ b/dlls/windows.gaming.input/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = windows.gaming.input.dll -IMPORTS = uuid +IMPORTS = combase uuid
C_SRCS = \ input.c diff --git a/dlls/windows.gaming.input/tests/input.c b/dlls/windows.gaming.input/tests/input.c index 6ce06de346e..b05dc508637 100644 --- a/dlls/windows.gaming.input/tests/input.c +++ b/dlls/windows.gaming.input/tests/input.c @@ -34,13 +34,6 @@
#include "wine/test.h"
-static HRESULT (WINAPI *pRoActivateInstance)(HSTRING, IInspectable **); -static HRESULT (WINAPI *pRoGetActivationFactory)(HSTRING, REFIID, void **); -static HRESULT (WINAPI *pRoInitialize)(RO_INIT_TYPE); -static void (WINAPI *pRoUninitialize)(void); -static HRESULT (WINAPI *pWindowsCreateString)(LPCWSTR, UINT32, HSTRING *); -static HRESULT (WINAPI *pWindowsDeleteString)(HSTRING); - struct gamepad_event_handler { IEventHandler_Gamepad IEventHandler_Gamepad_iface; @@ -119,13 +112,13 @@ static void test_Gamepad(void)
gamepad_event_handler.IEventHandler_Gamepad_iface.lpVtbl = &gamepad_event_handler_vtbl;
- hr = pRoInitialize(RO_INIT_MULTITHREADED); + hr = RoInitialize(RO_INIT_MULTITHREADED); ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
- hr = pWindowsCreateString(gamepad_name, wcslen(gamepad_name), &str); + hr = WindowsCreateString(gamepad_name, wcslen(gamepad_name), &str); ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
- hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#x\n", hr); if (hr == REGDB_E_CLASSNOTREG) { @@ -213,9 +206,9 @@ static void test_Gamepad(void) IInspectable_Release(inspectable); IActivationFactory_Release(factory);
- pWindowsDeleteString(str); + WindowsDeleteString(str);
- pRoUninitialize(); + RoUninitialize(); }
struct controller_event_handler @@ -296,13 +289,13 @@ static void test_RawGameController(void)
controller_event_handler.IEventHandler_RawGameController_iface.lpVtbl = &controller_event_handler_vtbl;
- hr = pRoInitialize(RO_INIT_MULTITHREADED); + hr = RoInitialize(RO_INIT_MULTITHREADED); ok(hr == S_OK || hr == S_FALSE, "RoInitialize failed, hr %#x\n", hr);
- hr = pWindowsCreateString(controller_name, wcslen(controller_name), &str); + hr = WindowsCreateString(controller_name, wcslen(controller_name), &str); ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
- hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#x\n", hr); if (hr == REGDB_E_CLASSNOTREG) { @@ -390,36 +383,13 @@ static void test_RawGameController(void) IInspectable_Release(inspectable); IActivationFactory_Release(factory);
- pWindowsDeleteString(str); + WindowsDeleteString(str);
- pRoUninitialize(); + RoUninitialize(); }
START_TEST(input) { - HMODULE combase; - - if (!(combase = LoadLibraryW(L"combase.dll"))) - { - win_skip("Failed to load combase.dll, skipping tests\n"); - return; - } - -#define LOAD_FUNCPTR(x) \ - if (!(p##x = (void*)GetProcAddress(combase, #x))) \ - { \ - win_skip("Failed to find %s in combase.dll, skipping tests.\n", #x); \ - return; \ - } - - LOAD_FUNCPTR(RoActivateInstance); - LOAD_FUNCPTR(RoGetActivationFactory); - LOAD_FUNCPTR(RoInitialize); - LOAD_FUNCPTR(RoUninitialize); - LOAD_FUNCPTR(WindowsCreateString); - LOAD_FUNCPTR(WindowsDeleteString); -#undef LOAD_FUNCPTR - test_Gamepad(); test_RawGameController(); }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/windows.globalization/tests/Makefile.in | 2 +- .../tests/globalization.c | 64 ++++++------------- 2 files changed, 19 insertions(+), 47 deletions(-)
diff --git a/dlls/windows.globalization/tests/Makefile.in b/dlls/windows.globalization/tests/Makefile.in index d928414c6ea..7ee2bc407d6 100644 --- a/dlls/windows.globalization/tests/Makefile.in +++ b/dlls/windows.globalization/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = windows.globalization.dll -IMPORTS = uuid +IMPORTS = combase uuid
C_SRCS = \ globalization.c diff --git a/dlls/windows.globalization/tests/globalization.c b/dlls/windows.globalization/tests/globalization.c index 631c7ad2449..ebe7ccc4704 100644 --- a/dlls/windows.globalization/tests/globalization.c +++ b/dlls/windows.globalization/tests/globalization.c @@ -38,14 +38,6 @@ /* kernel32.dll */ static INT (WINAPI *pGetUserDefaultGeoName)(LPWSTR, int);
-/* combase.dll */ -static HRESULT (WINAPI *pRoGetActivationFactory)(HSTRING, REFIID, void **); -static HRESULT (WINAPI *pRoInitialize)(RO_INIT_TYPE); -static void (WINAPI *pRoUninitialize)(void); -static HRESULT (WINAPI *pWindowsCreateString)(LPCWSTR, UINT32, HSTRING *); -static HRESULT (WINAPI *pWindowsDeleteString)(HSTRING); -static WCHAR *(WINAPI *pWindowsGetStringRawBuffer)(HSTRING, UINT32 *); -
static void test_GlobalizationPreferences(void) { @@ -56,28 +48,29 @@ static void test_GlobalizationPreferences(void) IActivationFactory *factory = NULL; IInspectable *inspectable = NULL, *tmp_inspectable = NULL; IAgileObject *agile_object = NULL, *tmp_agile_object = NULL; + WCHAR locale[LOCALE_NAME_MAX_LENGTH]; HSTRING str, tmp_str; + const WCHAR *buf; BOOLEAN found; HRESULT hr; UINT32 len; - WCHAR *buf, locale[LOCALE_NAME_MAX_LENGTH]; UINT32 i, size;
GetUserDefaultLocaleName(locale, LOCALE_NAME_MAX_LENGTH);
- hr = pRoInitialize(RO_INIT_MULTITHREADED); + hr = RoInitialize(RO_INIT_MULTITHREADED); ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
- hr = pWindowsCreateString(class_name, wcslen(class_name), &str); + hr = WindowsCreateString(class_name, wcslen(class_name), &str); ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
- hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#x\n", hr); if (hr == REGDB_E_CLASSNOTREG) { win_skip("%s runtimeclass not registered, skipping tests.\n", wine_dbgstr_w(class_name)); - pWindowsDeleteString(str); - pRoUninitialize(); + WindowsDeleteString(str); + RoUninitialize(); return; }
@@ -103,7 +96,7 @@ static void test_GlobalizationPreferences(void) hr = IGlobalizationPreferencesStatics_get_HomeGeographicRegion(preferences_statics, &tmp_str); ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_HomeGeographicRegion failed, hr %#x\n", hr);
- buf = pWindowsGetStringRawBuffer(tmp_str, &len); + buf = WindowsGetStringRawBuffer(tmp_str, &len); ok(buf != NULL && len > 0, "WindowsGetStringRawBuffer returned buf %p, len %u\n", buf, len); if (pGetUserDefaultGeoName) { @@ -116,7 +109,7 @@ static void test_GlobalizationPreferences(void) len, wine_dbgstr_w(buf), wine_dbgstr_w(country)); }
- pWindowsDeleteString(tmp_str); + WindowsDeleteString(tmp_str);
hr = IGlobalizationPreferencesStatics_get_Languages(preferences_statics, &languages); ok(hr == S_OK, "IGlobalizationPreferencesStatics_get_Languages failed, hr %#x\n", hr); @@ -138,7 +131,7 @@ static void test_GlobalizationPreferences(void)
hr = IVectorView_HSTRING_GetAt(languages, 0, &tmp_str); ok(hr == S_OK, "IVectorView_HSTRING_GetAt failed, hr %#x\n", hr); - buf = pWindowsGetStringRawBuffer(tmp_str, &len); + buf = WindowsGetStringRawBuffer(tmp_str, &len); ok(buf != NULL && len > 0, "WindowsGetStringRawBuffer returned buf %p, len %u\n", buf, len);
ok(wcslen(locale) == len && !memcmp(buf, locale, len), @@ -151,9 +144,9 @@ static void test_GlobalizationPreferences(void) ok(hr == S_OK, "IVectorView_HSTRING_IndexOf failed, hr %#x\n", hr); ok(i == 0 && found == TRUE, "IVectorView_HSTRING_IndexOf returned size %d, found %d\n", size, found);
- pWindowsDeleteString(tmp_str); + WindowsDeleteString(tmp_str);
- hr = pWindowsCreateString(L"deadbeef", 8, &tmp_str); + hr = WindowsCreateString(L"deadbeef", 8, &tmp_str); ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
i = 0xdeadbeef; @@ -162,7 +155,7 @@ static void test_GlobalizationPreferences(void) ok(hr == S_OK, "IVectorView_HSTRING_IndexOf failed, hr %#x\n", hr); ok(i == 0 && found == FALSE, "IVectorView_HSTRING_IndexOf returned size %d, found %d\n", size, found);
- pWindowsDeleteString(tmp_str); + WindowsDeleteString(tmp_str);
tmp_str = (HSTRING)0xdeadbeef; hr = IVectorView_HSTRING_GetAt(languages, size, &tmp_str); @@ -178,14 +171,14 @@ static void test_GlobalizationPreferences(void) ok(hr == S_OK, "IVectorView_HSTRING_GetAt failed, hr %#x\n", hr); ok(i == 1, "IVectorView_HSTRING_GetMany returned count %u, expected 1\n", i);
- buf = pWindowsGetStringRawBuffer(tmp_str, &len); + buf = WindowsGetStringRawBuffer(tmp_str, &len); ok(buf != NULL && len > 0, "WindowsGetStringRawBuffer returned buf %p, len %u\n", buf, len);
ok(wcslen(locale) == len && !memcmp(buf, locale, len), "IGlobalizationPreferencesStatics_get_Languages 0 returned len %u, str %s, expected %s\n", len, wine_dbgstr_w(buf), wine_dbgstr_w(locale));
- pWindowsDeleteString(tmp_str); + WindowsDeleteString(tmp_str);
IVectorView_HSTRING_Release(languages);
@@ -229,35 +222,14 @@ static void test_GlobalizationPreferences(void) IInspectable_Release(inspectable); IActivationFactory_Release(factory);
- pWindowsDeleteString(str); + WindowsDeleteString(str);
- pRoUninitialize(); + RoUninitialize(); }
START_TEST(globalization) { - HMODULE combase, kernel32; - - if (!(combase = LoadLibraryW(L"combase.dll"))) - { - win_skip("Failed to load combase.dll, skipping tests\n"); - return; - } - -#define LOAD_FUNCPTR(x) \ - if (!(p##x = (void*)GetProcAddress(combase, #x))) \ - { \ - win_skip("Failed to find %s in combase.dll, skipping tests.\n", #x); \ - return; \ - } - - LOAD_FUNCPTR(RoGetActivationFactory); - LOAD_FUNCPTR(RoInitialize); - LOAD_FUNCPTR(RoUninitialize); - LOAD_FUNCPTR(WindowsCreateString); - LOAD_FUNCPTR(WindowsDeleteString); - LOAD_FUNCPTR(WindowsGetStringRawBuffer); -#undef LOAD_FUNCPTR + HMODULE kernel32;
kernel32 = GetModuleHandleA("kernel32"); pGetUserDefaultGeoName = (void*)GetProcAddress(kernel32, "GetUserDefaultGeoName");
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/windows.media.devices/tests/Makefile.in | 2 +- dlls/windows.media.devices/tests/devices.c | 60 ++++++-------------- 2 files changed, 17 insertions(+), 45 deletions(-)
diff --git a/dlls/windows.media.devices/tests/Makefile.in b/dlls/windows.media.devices/tests/Makefile.in index 42aa4ac9b10..4d107889dad 100644 --- a/dlls/windows.media.devices/tests/Makefile.in +++ b/dlls/windows.media.devices/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = windows.media.devices.dll -IMPORTS = ole32 +IMPORTS = combase
C_SRCS = \ devices.c diff --git a/dlls/windows.media.devices/tests/devices.c b/dlls/windows.media.devices/tests/devices.c index f3777944848..d8acc638837 100644 --- a/dlls/windows.media.devices/tests/devices.c +++ b/dlls/windows.media.devices/tests/devices.c @@ -37,13 +37,6 @@
#include "wine/test.h"
-static HRESULT (WINAPI *pRoGetActivationFactory)(HSTRING, REFIID, void **); -static HRESULT (WINAPI *pRoInitialize)(RO_INIT_TYPE); -static void (WINAPI *pRoUninitialize)(void); -static HRESULT (WINAPI *pWindowsCreateString)(LPCWSTR, UINT32, HSTRING *); -static HRESULT (WINAPI *pWindowsDeleteString)(HSTRING); -static WCHAR *(WINAPI *pWindowsGetStringRawBuffer)(HSTRING, UINT32 *); - static HRESULT (WINAPI *pActivateAudioInterfaceAsync)(const WCHAR *path, REFIID riid, PROPVARIANT *params, IActivateAudioInterfaceCompletionHandler *done_handler, @@ -141,12 +134,12 @@ static void test_MediaDeviceStatics(void) HRESULT hr; DWORD dr;
- hr = pWindowsCreateString(media_device_statics_name, wcslen(media_device_statics_name), &str); + hr = WindowsCreateString(media_device_statics_name, wcslen(media_device_statics_name), &str); ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
- hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); ok(hr == S_OK, "RoGetActivationFactory failed, hr %#x\n", hr); - pWindowsDeleteString(str); + WindowsDeleteString(str);
/* interface tests */ hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable); @@ -182,12 +175,12 @@ static void test_MediaDeviceStatics(void)
if (g_default_capture_id) { - ok(wcsstr(pWindowsGetStringRawBuffer(str, NULL), g_default_capture_id) != NULL, + ok(wcsstr(WindowsGetStringRawBuffer(str, NULL), g_default_capture_id) != NULL, "Expected to find substring of default capture id in %s\n", - wine_dbgstr_w(pWindowsGetStringRawBuffer(str, NULL))); + wine_dbgstr_w(WindowsGetStringRawBuffer(str, NULL)));
/* returned id does not work in GetDevice... */ - hr = IMMDeviceEnumerator_GetDevice(g_mmdevenum, pWindowsGetStringRawBuffer(str, NULL), &mmdev); + hr = IMMDeviceEnumerator_GetDevice(g_mmdevenum, WindowsGetStringRawBuffer(str, NULL), &mmdev); ok(hr == E_INVALIDARG, "GetDevice gave wrong error: %08x\n", hr);
/* ...but does work in ActivateAudioInterfaceAsync */ @@ -199,7 +192,7 @@ static void test_MediaDeviceStatics(void) strcpy(async_activate_test.msg_pfx, "capture_activate");
EnterCriticalSection(&async_activate_test.lock); - hr = pActivateAudioInterfaceAsync(pWindowsGetStringRawBuffer(str, NULL), + hr = pActivateAudioInterfaceAsync(WindowsGetStringRawBuffer(str, NULL), &IID_IAudioClient2, NULL, &async_activate_done, &async_activate_test.op); ok(hr == S_OK, "ActivateAudioInterfaceAsync failed: %08x\n", hr); LeaveCriticalSection(&async_activate_test.lock); @@ -212,7 +205,7 @@ static void test_MediaDeviceStatics(void) ok(async_activate_test.result_iface != NULL, "Expected to get WASAPI interface, but got NULL\n"); IUnknown_Release(async_activate_test.result_iface);
- pWindowsDeleteString(str); + WindowsDeleteString(str); }
/* test default render device creation */ @@ -223,12 +216,12 @@ static void test_MediaDeviceStatics(void)
if (g_default_render_id) { - ok(wcsstr(pWindowsGetStringRawBuffer(str, NULL), g_default_render_id) != NULL, + ok(wcsstr(WindowsGetStringRawBuffer(str, NULL), g_default_render_id) != NULL, "Expected to find substring of default render id in %s\n", - wine_dbgstr_w(pWindowsGetStringRawBuffer(str, NULL))); + wine_dbgstr_w(WindowsGetStringRawBuffer(str, NULL)));
/* returned id does not work in GetDevice... */ - hr = IMMDeviceEnumerator_GetDevice(g_mmdevenum, pWindowsGetStringRawBuffer(str, NULL), &mmdev); + hr = IMMDeviceEnumerator_GetDevice(g_mmdevenum, WindowsGetStringRawBuffer(str, NULL), &mmdev); ok(hr == E_INVALIDARG, "GetDevice gave wrong error: %08x\n", hr);
/* ...but does work in ActivateAudioInterfaceAsync */ @@ -240,7 +233,7 @@ static void test_MediaDeviceStatics(void) strcpy(async_activate_test.msg_pfx, "render_activate");
EnterCriticalSection(&async_activate_test.lock); - hr = pActivateAudioInterfaceAsync(pWindowsGetStringRawBuffer(str, NULL), + hr = pActivateAudioInterfaceAsync(WindowsGetStringRawBuffer(str, NULL), &IID_IAudioClient2, NULL, &async_activate_done, &async_activate_test.op); ok(hr == S_OK, "ActivateAudioInterfaceAsync failed: %08x\n", hr); LeaveCriticalSection(&async_activate_test.lock); @@ -253,7 +246,7 @@ static void test_MediaDeviceStatics(void) ok(async_activate_test.result_iface != NULL, "Expected to get WASAPI interface, but got NULL\n"); IUnknown_Release(async_activate_test.result_iface);
- pWindowsDeleteString(str); + WindowsDeleteString(str); }
/* cleanup */ @@ -264,31 +257,10 @@ static void test_MediaDeviceStatics(void)
START_TEST(devices) { - HMODULE combase, mmdevapi; + HMODULE mmdevapi; IMMDevice *mmdev; HRESULT hr;
- if (!(combase = LoadLibraryW(L"combase.dll"))) - { - win_skip("Failed to load combase.dll, skipping tests\n"); - return; - } - -#define LOAD_FUNCPTR(x) \ - if (!(p##x = (void*)GetProcAddress(combase, #x))) \ - { \ - win_skip("Failed to find %s in combase.dll, skipping tests.\n", #x); \ - return; \ - } - - LOAD_FUNCPTR(RoGetActivationFactory); - LOAD_FUNCPTR(RoInitialize); - LOAD_FUNCPTR(RoUninitialize); - LOAD_FUNCPTR(WindowsCreateString); - LOAD_FUNCPTR(WindowsDeleteString); - LOAD_FUNCPTR(WindowsGetStringRawBuffer); -#undef LOAD_FUNCPTR - if (!(mmdevapi = LoadLibraryW(L"mmdevapi.dll"))) { win_skip("Failed to load mmdevapi.dll, skipping tests\n"); @@ -305,7 +277,7 @@ START_TEST(devices) LOAD_FUNCPTR(ActivateAudioInterfaceAsync); #undef LOAD_FUNCPTR
- hr = pRoInitialize(RO_INIT_MULTITHREADED); + hr = RoInitialize(RO_INIT_MULTITHREADED); ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, @@ -340,5 +312,5 @@ START_TEST(devices) CoTaskMemFree(g_default_render_id); IMMDeviceEnumerator_Release(g_mmdevenum);
- pRoUninitialize(); + RoUninitialize(); }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/windows.media.speech/tests/Makefile.in | 2 +- dlls/windows.media.speech/tests/speech.c | 50 +++++---------------- 2 files changed, 11 insertions(+), 41 deletions(-)
diff --git a/dlls/windows.media.speech/tests/Makefile.in b/dlls/windows.media.speech/tests/Makefile.in index f3e458f53d1..2ee10d3db21 100644 --- a/dlls/windows.media.speech/tests/Makefile.in +++ b/dlls/windows.media.speech/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = windows.media.speech.dll -IMPORTS = uuid +IMPORTS = combase uuid
C_SRCS = \ speech.c diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c index 1c48c5bf933..c949b35900b 100644 --- a/dlls/windows.media.speech/tests/speech.c +++ b/dlls/windows.media.speech/tests/speech.c @@ -34,13 +34,6 @@
#include "wine/test.h"
-static HRESULT (WINAPI *pRoActivateInstance)(HSTRING, IInspectable **); -static HRESULT (WINAPI *pRoGetActivationFactory)(HSTRING, REFIID, void **); -static HRESULT (WINAPI *pRoInitialize)(RO_INIT_TYPE); -static void (WINAPI *pRoUninitialize)(void); -static HRESULT (WINAPI *pWindowsCreateString)(LPCWSTR, UINT32, HSTRING *); -static HRESULT (WINAPI *pWindowsDeleteString)(HSTRING); - static void test_SpeechSynthesizer(void) { static const WCHAR *speech_synthesizer_name = L"Windows.Media.SpeechSynthesis.SpeechSynthesizer"; @@ -55,13 +48,13 @@ static void test_SpeechSynthesizer(void) HRESULT hr; UINT32 size;
- hr = pRoInitialize(RO_INIT_MULTITHREADED); + hr = RoInitialize(RO_INIT_MULTITHREADED); ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
- hr = pWindowsCreateString(speech_synthesizer_name, wcslen(speech_synthesizer_name), &str); + hr = WindowsCreateString(speech_synthesizer_name, wcslen(speech_synthesizer_name), &str); ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
- hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); ok(hr == S_OK, "RoGetActivationFactory failed, hr %#x\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable); @@ -116,9 +109,9 @@ static void test_SpeechSynthesizer(void) IInspectable_Release(inspectable); IActivationFactory_Release(factory);
- pWindowsDeleteString(str); + WindowsDeleteString(str);
- pRoUninitialize(); + RoUninitialize(); }
static void test_VoiceInformation(void) @@ -129,45 +122,22 @@ static void test_VoiceInformation(void) HSTRING str; HRESULT hr;
- hr = pRoInitialize(RO_INIT_MULTITHREADED); + hr = RoInitialize(RO_INIT_MULTITHREADED); ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
- hr = pWindowsCreateString(voice_information_name, wcslen(voice_information_name), &str); + hr = WindowsCreateString(voice_information_name, wcslen(voice_information_name), &str); ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
- hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#x\n", hr);
- pWindowsDeleteString(str); + WindowsDeleteString(str);
- pRoUninitialize(); + RoUninitialize(); }
START_TEST(speech) { - HMODULE combase; - - if (!(combase = LoadLibraryW(L"combase.dll"))) - { - win_skip("Failed to load combase.dll, skipping tests\n"); - return; - } - -#define LOAD_FUNCPTR(x) \ - if (!(p##x = (void*)GetProcAddress(combase, #x))) \ - { \ - win_skip("Failed to find %s in combase.dll, skipping tests.\n", #x); \ - return; \ - } - - LOAD_FUNCPTR(RoActivateInstance); - LOAD_FUNCPTR(RoGetActivationFactory); - LOAD_FUNCPTR(RoInitialize); - LOAD_FUNCPTR(RoUninitialize); - LOAD_FUNCPTR(WindowsCreateString); - LOAD_FUNCPTR(WindowsDeleteString); -#undef LOAD_FUNCPTR - test_SpeechSynthesizer(); test_VoiceInformation(); }