[PATCH 0/1] MR9713: xaudio2_7/tests: Dynamically load function XAudio2CreateWithVersionInfo.
Make the test run again with win10-1709 and before. Followup to e04f84dc4c. [Test pattern page](https://test.winehq.org/data/patterns.html#xaudio2_8:xaudio2) [Testbot run with this patch](https://testbot.winehq.org/JobDetails.pl?Key=161206) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9713
From: Bernhard Übelacker <bernhardu(a)mailbox.org> Followup to e04f84dc4c. --- dlls/xaudio2_7/tests/xaudio2.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c index 1165db2a1f6..115616cf764 100644 --- a/dlls/xaudio2_7/tests/xaudio2.c +++ b/dlls/xaudio2_7/tests/xaudio2.c @@ -1444,12 +1444,20 @@ static void test_XAudio2CreateWithVersionInfo(void) { IXAudio2 *audio; HRESULT hr; + HMODULE mod = GetModuleHandleA("xaudio2_8.dll"); + HRESULT (WINAPI *pXAudio2CreateWithVersionInfo)(IXAudio2**, UINT32, XAUDIO2_PROCESSOR, DWORD); + pXAudio2CreateWithVersionInfo = (void *)GetProcAddress(mod, "XAudio2CreateWithVersionInfo"); - hr = XAudio2CreateWithVersionInfo(&audio, 0, XAUDIO2_DEFAULT_PROCESSOR, 0); + if(!pXAudio2CreateWithVersionInfo){ /* not available up to win10-1709 */ + win_skip("Function XAudio2CreateWithVersionInfo not present in xaudio2_8.dll\n"); + return; + } + + hr = pXAudio2CreateWithVersionInfo(&audio, 0, XAUDIO2_DEFAULT_PROCESSOR, 0); ok(hr == S_OK, "got %#lx.\n", hr); IXAudio2_Release(audio); - hr = XAudio2CreateWithVersionInfo(&audio, 0, XAUDIO2_DEFAULT_PROCESSOR, ~0); + hr = pXAudio2CreateWithVersionInfo(&audio, 0, XAUDIO2_DEFAULT_PROCESSOR, ~0); ok(hr == S_OK, "got %#lx.\n", hr); IXAudio2_Release(audio); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9713
Unsure if this patch is still wanted? The test pattern page no longer shows this "missing module", but it is still visible in the single test version details [e.g. here with this lines](https://test.winehq.org/data/e53db200ca08f0aeb196617fa0238a776be2b7f8/win81_...): | | DLL version | |---------------|-------------------------------------| | wtsapi32 | 6.3.9600.17415 | | xactengine3_7 | 9.29.1962.0 | | xaudio2_7 | 9.29.1962.0 | | xaudio2_8 | missing an ordinal (6.3.9600.17415) | | xcopy.exe | 6.3.9600.17415 | -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9713#note_128651
This merge request was approved by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9713
participants (3)
-
Bernhard Übelacker -
Bernhard Übelacker (@bernhardu) -
Huw Davies (@huw)