Lock

The Lock callback function locks a specified area of surface memory.

DWORD __stdcall Lock(
LPDDHAL_LOCKDATA pld );

Parameters

  • pld
    Pointer to a DDHAL_LOCKDATA structure that contains the information required to lock the specified area.

Return Values

Returns one of the following values:

  • DDHAL_DRIVER_HANDLED
  • DDHAL_DRIVER_NOTHANDLED

Remarks

An example implementation of this callback function (Lock32) can be found in the IGS sample driver source code.

During the setup for an emulated bilt (that is, a blit performed by the DirectDraw HEL, not the HAL), the HAL's Lock function is called to obtain a pointer to any display memory surfaces involved in the blit. Drivers for DirectX 5.0 and later may be passed DDLOCK_READONLY or DDLOCK_WRITEONLY on Lock for such blits. These flags indicate that the host processor only reads from or writes to the surface for the duration of this Lock. If neither flag is specified, then the driver should assume that read/write access is required.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.