// d3dumddi.h
PFND3DDDI_RESOLVESHAREDRESOURCE Pfnd3dddiResolvesharedresource;
HRESULT Pfnd3dddiResolvesharedresource(
HANDLE hDevice,
const D3DDDIARG_RESOLVESHAREDRESOURCE *unnamedParam2
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The ResolveSharedResource function informs a user-mode display driver that ownership of a shared surface changed or that a surface is being used for GDI interoperation.
hDeviceA handle to the display device (that is, the graphics context) that is associated with the shared surface or GDI interoperable surface.
unnamedParam2pData [in]
A pointer to a D3DDDIARG_RESOLVESHAREDRESOURCE structure that contains a handle to the surface.
ResolveSharedResource returns one of the following values:
| Return code | Description |
|---|---|
| S_OK | The resource is successfully resolved. |
| D3DDDIERR_DEVICEREMOVED | The driver detects that the graphics adapter was removed. Therefore, the driver did not complete the operation. If the driver never notices the adapter-removal condition, the driver is not required to return this error code. |
The Direct3D runtime calls ResolveSharedResource when an application calls one of the following functions:
The runtime calls the driver's ResolveSharedResource function every time a shared surface owner changes or when a surface is used for GDI interoperation. The runtime supplies ResolveSharedResource with handles to the display device--via the hDevice parameter-- and the surface--via the pData parameter.
The driver implements ResolveSharedResource to appropriately manage resources for multiple GPU scenarios. Each resource might be divided across memory for multiple GPUs to render on. The driver can implement ResolveSharedResource to remerge each resource so that the new resource owner has the merged resource. The driver must flush any partially built command buffers that might modify the resource.
D3DDDIARG_RESOLVESHAREDRESOURCE