static HRESULT WINAPI IDirect3DSurface9Impl_GetDC(IDirect3DSurface9 *iface, HDC* phdc) { IDirect3DSurface9Impl *This = impl_from_IDirect3DSurface9(iface); HRESULT hr; TRACE("iface %p, hdc %p.\n", iface, phdc); if(!This->getdc_supported) { WARN("Surface does not support GetDC, returning D3DERR_INVALIDCALL\n"); /* Don't touch the DC */ return D3DERR_INVALIDCALL; } wined3d_mutex_lock(); hr = wined3d_surface_getdc(This->wined3d_surface, phdc); wined3d_mutex_unlock(); return hr; }
static HRESULT WINAPI d3d9_surface_GetDC(IDirect3DSurface9 *iface, HDC *dc) { struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface); HRESULT hr; TRACE("iface %p, dc %p.\n", iface, dc); if (!surface->getdc_supported) { WARN("Surface does not support GetDC, returning D3DERR_INVALIDCALL\n"); /* Don't touch the DC */ return D3DERR_INVALIDCALL; } wined3d_mutex_lock(); hr = wined3d_surface_getdc(surface->wined3d_surface, dc); wined3d_mutex_unlock(); return hr; }