PFND3DDDI_UNLOCKASYNC callback function (d3dumddi.h)

The UnlockAsync function unlocks a resource or a surface within the resource that the LockAsync function previously locked.

Syntax

PFND3DDDI_UNLOCKASYNC Pfnd3dddiUnlockasync;

HRESULT Pfnd3dddiUnlockasync(
  HANDLE hDevice,
  const D3DDDIARG_UNLOCKASYNC *unnamedParam2
)
{...}

Parameters

hDevice

A handle to a display device (that is, the graphics context).

unnamedParam2

pData [in]

A pointer to a D3DDDIARG_UNLOCKASYNC structure that describes the resource or surface within the resource to unlock.

Return value

UnlockAsync returns one of the following values:

Return code Description
S_OK The resource is successfully unlocked.
E_OUTOFMEMORY UnlockAsync could not allocate the required memory for it to complete.
E_INVALIDARG The resource that D3DDDIARG_UNLOCKASYNC describes was not locked by a previous call to the driver's LockAsync function.

Remarks

A user-mode display driver should call the pfnUnlockCb function with the appropriate allocation handle after the UnlockAsync function is called.

A user-mode display driver optionally implements UnlockAsync; the Microsoft Direct3D runtime calls UnlockAsync only if the driver implements the LockAsync, UnlockAsync, and Rename functions.

Like LockAsync, UnlockAsync is called on the main application thread while most other calls to the user-mode display driver functions are made on a worker thread (on multiple-processor computers).

If a user-mode display driver exposes a DDI version of 0x0000000B or greater (the driver returns this value in the DriverVersion member of the D3D10DDIARG_OPENADAPTER structure in a call to the driver's OpenAdapter function), the Direct3D runtime will call UnlockAsync in a reentrant manner. When the runtime calls UnlockAsync in a reentrant manner, one thread can execute inside UnlockAsync while another thread that references the same display device executes inside of another user-mode display driver function.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3dumddi.h (include D3dumddi.h)

See also

D3DDDIARG_UNLOCKASYNC

D3DDDI_DEVICEFUNCS

LockAsync

Rename

pfnUnlockCb