DirectInputCreateEx is available on all versions of Windows since XP at least.
From: Alex Henrie alexhenrie24@gmail.com
DirectInputCreateEx is available on all versions of Windows since XP at least. --- dlls/dinput/tests/dinput.c | 16 +++++----------- dlls/dinput/tests/dinput_test.h | 1 - dlls/dinput/tests/hid.c | 2 -- 3 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c index 7df8f3ace85..682a5cbf97f 100644 --- a/dlls/dinput/tests/dinput.c +++ b/dlls/dinput/tests/dinput.c @@ -315,14 +315,8 @@ static void test_DirectInputCreateEx( DWORD version ) HRESULT hr; int i;
- if (!pDirectInputCreateEx) - { - win_skip("DirectInputCreateEx is not available\n"); - return; - } - 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( unknown == NULL, "got IUnknown %p\n", unknown );
@@ -330,8 +324,8 @@ static void test_DirectInputCreateEx( DWORD version ) { winetest_push_context( "%u", i ); unknown = (void *)0xdeadbeef; - hr = pDirectInputCreateEx( create_tests[i].instance, create_tests[i].version, create_tests[i].iid, - (void **)create_tests[i].out, NULL ); + hr = DirectInputCreateEx( create_tests[i].instance, create_tests[i].version, create_tests[i].iid, + (void **)create_tests[i].out, NULL ); todo_wine_if( version == 0x300 && i == 7 ) ok( hr == create_tests[i].expected_hr, "DirectInputCreateEx returned %#lx\n", hr ); if (SUCCEEDED(hr)) IUnknown_Release( unknown ); @@ -343,7 +337,7 @@ static void test_DirectInputCreateEx( DWORD version ) { winetest_push_context( "%u", i ); 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( unknown == (void *)0xdeadbeef, "got IUnknown %p\n", unknown ); winetest_pop_context(); @@ -353,7 +347,7 @@ static void test_DirectInputCreateEx( DWORD version ) { winetest_push_context( "%u", i ); 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 ); else ok( hr == DIERR_OLDDIRECTINPUTVERSION, "DirectInputCreateEx returned %#lx\n", hr ); if (version < 0x800) ok( unknown != NULL, "got IUnknown NULL\n" ); diff --git a/dlls/dinput/tests/dinput_test.h b/dlls/dinput/tests/dinput_test.h index 04738cffb44..94c3df3710c 100644 --- a/dlls/dinput/tests/dinput_test.h +++ b/dlls/dinput/tests/dinput_test.h @@ -50,7 +50,6 @@ extern const GUID expect_guid_product; extern const WCHAR expect_path[]; extern const WCHAR expect_path_end[];
-extern typeof(DirectInputCreateEx) *pDirectInputCreateEx; extern HANDLE device_added, device_removed; extern HINSTANCE instance; extern BOOL localized; /* object names get translated */ diff --git a/dlls/dinput/tests/hid.c b/dlls/dinput/tests/hid.c index 5467af32493..88565283735 100644 --- a/dlls/dinput/tests/hid.c +++ b/dlls/dinput/tests/hid.c @@ -60,7 +60,6 @@
#include "dinput_test.h"
-typeof(DirectInputCreateEx) *pDirectInputCreateEx; HINSTANCE instance; BOOL localized; /* object names get translated */
@@ -3483,7 +3482,6 @@ void dinput_test_init_( const char *file, int line ) instance = GetModuleHandleW( NULL ); localized = GetUserDefaultLCID() != MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT); pSignerSign = (void *)GetProcAddress( LoadLibraryW( L"mssign32" ), "SignerSign" ); - pDirectInputCreateEx = (void *)GetProcAddress( LoadLibraryW(L"dinput.dll"), "DirectInputCreateEx" );
if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64) {
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=126275
Your paranoid android.
=== w1064_tsign (64 bit report) ===
dinput: hid.c:3042: Test failed: got "\xff%\x9a\xda\x05\x00\xcc\xcc" expected "HidP KDR"
This merge request was approved by Rémi Bernon.