+ +START_TEST(wintypes) +{ + 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) + LOAD_FUNCPTR(WindowsGetStringRawBuffer) +#undef LOAD_FUNCPTR + + test_IApiInformationStatics(); +}
It looks good but I don't think you really need to load combase.dll dynamically here. It was useful for dinput tests because it's testing non-WinRT stuff which work on Win7 too.