// d3dumddi.h
PFND3DDDI_RENAME Pfnd3dddiRename;
HRESULT Pfnd3dddiRename(
HANDLE hDevice,
const D3DDDIARG_RENAME *unnamedParam2
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The Rename function informs a user-mode display driver to start using the renamed allocation that the LockAsync function previously returned for the specified resource.
hDeviceA handle to a display device (that is, the graphics context).
unnamedParam2pData [in]
A pointer to a D3DDDIARG_RENAME structure that describes the resource or surface within a resource to rename with a new allocation.
Rename returns one of the following values:
| Return code | Description |
|---|---|
| S_OK | The resource is successfully renamed. |
| E_OUTOFMEMORY | Rename could not allocate the required memory for it to complete. |
On multiple-processor computers, the Microsoft Direct3D runtime calls the user-mode display driver's Rename function from a worker thread instead of from the main application thread. The runtime calls Rename, at most, once for each successful call to the driver's LockAsync function with the Discard bit-field flag set in the Flags member of the D3DDDIARG_LOCKASYNC structure that the pData parameter of LockAsync points to.
Rename informs the driver to start using the renamed allocation that is specified by the hCookie member of the D3DDDIARG_RENAME structure that the pData parameter of Rename points to. The hCookie handle was previously returned by the LockAsync function if the Discard bit-field flag was set for the locked resource.
After Rename returns successfully (with S_OK), the user-mode display driver should use the allocation that hCookie specifies for all rendering operations that reference the resource that the hResource and SubResourceIndex members of D3DDDIARG_RENAME specify.