Partager via


DD_DXAPI_LOCK control code

A video capture driver passes DD_DXAPI_LOCK in the dwFunctionNum parameter of the DxApi function to allow the client to access the surface for an indefinite amount of time.

Input Parameters

  • lpvInBuffer
    Pointer to a DDLOCKIN structure that contains the handle information required for the lock.

Output Parameters

  • lpvOutBuffer
    Pointer to a DDLOCKOUT structure that contains the surface information from the surface that is locked.

Remarks

If the surface ever becomes unusable due to a full-screen command prompt, a resolution change, and so on, the pfnSurfaceClose callback specified in the DD_DXAPI_OPENSURFACE function identifier is called to notify the client that it should no longer access this surface.

The lpSurface member of DDLOCKOUT contains the pointer that can be used to access the surface. The other members of DDLOCKOUT relate closely to their counterparts in the DDSURFACEDESC structure (dwSurfWidth correlates to dwWidth, SurfaceCaps correlates to ddsCaps, dwFormatFlags correlates to ddpfPixelFormat.dwFlags, and so on).

There is no corresponding Unlock function identifier.

This function identifier can only be called from PASSIVE_LEVEL.

Requirements

Header file: Ddkmapi.h (include Ddkmapi.h)

See also

DD_DXAPI_OPENSURFACE

DDLOCKIN

DDLOCKOUT

DDSURFACEDESC

NotifyCallback