d3d10core: Implement D3D10CoreCreateDevice().

This commit is contained in:
Henri Verbeet 2008-11-14 13:57:06 +01:00 committed by Alexandre Julliard
parent ddbd4ab3b8
commit 3505b5cf17
3 changed files with 24 additions and 0 deletions

View File

@ -1 +1,2 @@
@ stdcall D3D10CoreCreateDevice(ptr ptr long long ptr)
@ stdcall D3D10CoreRegisterLayers()

View File

@ -104,3 +104,24 @@ HRESULT WINAPI D3D10CoreRegisterLayers(void)
return S_OK;
}
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, DWORD unknown0, ID3D10Device **device)
{
IUnknown *dxgi_device;
HMODULE d3d10core;
HRESULT hr;
d3d10core = GetModuleHandleA("d3d10core.dll");
hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, flags, unknown0, (void **)&dxgi_device);
if (FAILED(hr))
{
WARN("Failed to create device, returning %#x\n", hr);
return hr;
}
hr = IUnknown_QueryInterface(dxgi_device, &IID_ID3D10Device, (void **)device);
IUnknown_Release(dxgi_device);
return hr;
}

View File

@ -75,6 +75,8 @@ struct dxgi_device_layer
void *device_object, REFIID riid, void **device_layer);
};
HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, IDXGIAdapter *adapter,
UINT flags, DWORD unknown0, void **device);
HRESULT WINAPI DXGID3D10RegisterLayers(const struct dxgi_device_layer *layers, UINT layer_count);
#endif /* __WINE_D3D10CORE_PRIVATE_H */