Commit dd51cd8d authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

gdi32/tests: Avoid a D3DKMTOpenAdapterFromHdc() crash on Windows 10 >= 2004.

parent 34155d09
...@@ -105,18 +105,23 @@ static void test_D3DKMTOpenAdapterFromHdc(void) ...@@ -105,18 +105,23 @@ static void test_D3DKMTOpenAdapterFromHdc(void)
HDC hdc; HDC hdc;
DWORD i; DWORD i;
if (!pD3DKMTOpenAdapterFromHdc || pD3DKMTOpenAdapterFromHdc(NULL) == STATUS_PROCEDURE_NOT_FOUND) if (!pD3DKMTOpenAdapterFromHdc)
{ {
win_skip("D3DKMTOpenAdapterFromHdc() is unavailable.\n"); win_skip("D3DKMTOpenAdapterFromHdc() is missing.\n");
return; return;
} }
/* Invalid parameters */ /* Invalid parameters */
status = pD3DKMTOpenAdapterFromHdc(NULL); /* Passing a NULL pointer crashes on Windows 10 >= 2004 */
todo_wine ok(status == STATUS_INVALID_PARAMETER, "Got unexpected return code %#x.\n", status); if (0) status = pD3DKMTOpenAdapterFromHdc(NULL);
memset(&open_adapter_hdc_desc, 0, sizeof(open_adapter_hdc_desc)); memset(&open_adapter_hdc_desc, 0, sizeof(open_adapter_hdc_desc));
status = pD3DKMTOpenAdapterFromHdc(&open_adapter_hdc_desc); status = pD3DKMTOpenAdapterFromHdc(&open_adapter_hdc_desc);
if (status == STATUS_PROCEDURE_NOT_FOUND)
{
win_skip("D3DKMTOpenAdapterFromHdc() is not supported.\n");
return;
}
todo_wine ok(status == STATUS_INVALID_PARAMETER, "Got unexpected return code %#x.\n", status); todo_wine ok(status == STATUS_INVALID_PARAMETER, "Got unexpected return code %#x.\n", status);
/* Open adapter */ /* Open adapter */
......
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