Nikolay Sivov (@nsivov) commented about dlls/d2d1/tests/d2d1.c:
- {
win_skip("ID2D1Factory1 is not supported.\n");
release_test_context(&ctx);
return;
- }
- hr = ID2D1Factory1_CreateDevice(ctx.factory1, ctx.device, &device);
- ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
- hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &context);
- ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
- ID2D1DeviceContext_SetTarget(context, NULL);
- hr = ID2D1DeviceContext_QueryInterface(context, &IID_ID2D1RenderTarget, (void **)&rt);
- ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
Just use context methods, it inherits from ID2D1RenderTarget.