Commit f3e9a1b7 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

dinput/tests: Get rid of pDirectInputCreateEx.

DirectInputCreateEx is available on all versions of Windows since XP at least.
parent eeecf6f0
...@@ -315,14 +315,8 @@ static void test_DirectInputCreateEx( DWORD version ) ...@@ -315,14 +315,8 @@ static void test_DirectInputCreateEx( DWORD version )
HRESULT hr; HRESULT hr;
int i; int i;
if (!pDirectInputCreateEx)
{
win_skip("DirectInputCreateEx is not available\n");
return;
}
unknown = (void *)0xdeadbeef; unknown = (void *)0xdeadbeef;
hr = pDirectInputCreateEx( instance, version, &IID_IDirectInputW, (void **)&unknown, &outer ); hr = DirectInputCreateEx( instance, version, &IID_IDirectInputW, (void **)&unknown, &outer );
ok( hr == DI_OK, "DirectInputCreateW returned %#lx\n", hr ); ok( hr == DI_OK, "DirectInputCreateW returned %#lx\n", hr );
ok( unknown == NULL, "got IUnknown %p\n", unknown ); ok( unknown == NULL, "got IUnknown %p\n", unknown );
...@@ -330,8 +324,8 @@ static void test_DirectInputCreateEx( DWORD version ) ...@@ -330,8 +324,8 @@ static void test_DirectInputCreateEx( DWORD version )
{ {
winetest_push_context( "%u", i ); winetest_push_context( "%u", i );
unknown = (void *)0xdeadbeef; unknown = (void *)0xdeadbeef;
hr = pDirectInputCreateEx( create_tests[i].instance, create_tests[i].version, create_tests[i].iid, hr = DirectInputCreateEx( create_tests[i].instance, create_tests[i].version, create_tests[i].iid,
(void **)create_tests[i].out, NULL ); (void **)create_tests[i].out, NULL );
todo_wine_if( version == 0x300 && i == 7 ) todo_wine_if( version == 0x300 && i == 7 )
ok( hr == create_tests[i].expected_hr, "DirectInputCreateEx returned %#lx\n", hr ); ok( hr == create_tests[i].expected_hr, "DirectInputCreateEx returned %#lx\n", hr );
if (SUCCEEDED(hr)) IUnknown_Release( unknown ); if (SUCCEEDED(hr)) IUnknown_Release( unknown );
...@@ -343,7 +337,7 @@ static void test_DirectInputCreateEx( DWORD version ) ...@@ -343,7 +337,7 @@ static void test_DirectInputCreateEx( DWORD version )
{ {
winetest_push_context( "%u", i ); winetest_push_context( "%u", i );
unknown = (void *)0xdeadbeef; unknown = (void *)0xdeadbeef;
hr = pDirectInputCreateEx( instance, version, dinput8_interfaces[i], (void **)&unknown, NULL ); hr = DirectInputCreateEx( instance, version, dinput8_interfaces[i], (void **)&unknown, NULL );
ok( hr == DIERR_NOINTERFACE, "DirectInputCreateEx returned %#lx\n", hr ); ok( hr == DIERR_NOINTERFACE, "DirectInputCreateEx returned %#lx\n", hr );
ok( unknown == (void *)0xdeadbeef, "got IUnknown %p\n", unknown ); ok( unknown == (void *)0xdeadbeef, "got IUnknown %p\n", unknown );
winetest_pop_context(); winetest_pop_context();
...@@ -353,7 +347,7 @@ static void test_DirectInputCreateEx( DWORD version ) ...@@ -353,7 +347,7 @@ static void test_DirectInputCreateEx( DWORD version )
{ {
winetest_push_context( "%u", i ); winetest_push_context( "%u", i );
unknown = NULL; unknown = NULL;
hr = pDirectInputCreateEx( instance, version, dinput7_interfaces[i], (void **)&unknown, NULL ); hr = DirectInputCreateEx( instance, version, dinput7_interfaces[i], (void **)&unknown, NULL );
if (version < 0x800) ok( hr == DI_OK, "DirectInputCreateEx returned %#lx\n", hr ); if (version < 0x800) ok( hr == DI_OK, "DirectInputCreateEx returned %#lx\n", hr );
else ok( hr == DIERR_OLDDIRECTINPUTVERSION, "DirectInputCreateEx returned %#lx\n", hr ); else ok( hr == DIERR_OLDDIRECTINPUTVERSION, "DirectInputCreateEx returned %#lx\n", hr );
if (version < 0x800) ok( unknown != NULL, "got IUnknown NULL\n" ); if (version < 0x800) ok( unknown != NULL, "got IUnknown NULL\n" );
......
...@@ -50,7 +50,6 @@ extern const GUID expect_guid_product; ...@@ -50,7 +50,6 @@ extern const GUID expect_guid_product;
extern const WCHAR expect_path[]; extern const WCHAR expect_path[];
extern const WCHAR expect_path_end[]; extern const WCHAR expect_path_end[];
extern typeof(DirectInputCreateEx) *pDirectInputCreateEx;
extern HANDLE device_added, device_removed; extern HANDLE device_added, device_removed;
extern HINSTANCE instance; extern HINSTANCE instance;
extern BOOL localized; /* object names get translated */ extern BOOL localized; /* object names get translated */
......
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
#include "dinput_test.h" #include "dinput_test.h"
typeof(DirectInputCreateEx) *pDirectInputCreateEx;
HINSTANCE instance; HINSTANCE instance;
BOOL localized; /* object names get translated */ BOOL localized; /* object names get translated */
...@@ -3483,7 +3482,6 @@ void dinput_test_init_( const char *file, int line ) ...@@ -3483,7 +3482,6 @@ void dinput_test_init_( const char *file, int line )
instance = GetModuleHandleW( NULL ); instance = GetModuleHandleW( NULL );
localized = GetUserDefaultLCID() != MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT); localized = GetUserDefaultLCID() != MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT);
pSignerSign = (void *)GetProcAddress( LoadLibraryW( L"mssign32" ), "SignerSign" ); pSignerSign = (void *)GetProcAddress( LoadLibraryW( L"mssign32" ), "SignerSign" );
pDirectInputCreateEx = (void *)GetProcAddress( LoadLibraryW(L"dinput.dll"), "DirectInputCreateEx" );
if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64) if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment