DD_LOCKDATA structure (ddrawint.h)
The DD_LOCKDATA structure contains information necessary to do a lock as defined by the Microsoft DirectDraw parameter structures.
Syntax
typedef struct _DD_LOCKDATA {
PDD_DIRECTDRAW_GLOBAL lpDD;
PDD_SURFACE_LOCAL lpDDSurface;
DWORD bHasRect;
RECTL rArea;
LPVOID lpSurfData;
HRESULT ddRVal;
VOID *Lock;
DWORD dwFlags;
FLATPTR fpProcess;
} *PDD_LOCKDATA, DD_LOCKDATA;
Members
lpDD
Points to a DD_DIRECTDRAW_GLOBAL structure that describes the driver's device.
lpDDSurface
Points to a DD_SURFACE_LOCAL structure that describes the surface--in the case of LockD3DBuffer, a buffer--associated with the memory region to be locked down.
bHasRect
Specifies whether the area in rArea is valid. A value of 0x00000001 indicates a valid area, 0x00000000 indicates an invalid area.
rArea
Specifies a RECTL structure that defines the area on the surface to lock down.
lpSurfData
Specifies the location in which the driver can return a pointer to the memory region that it locked down.
ddRVal
Specifies the location in which the driver writes the return value of either the DdLock or LockD3DBuffer callback. A return code of DD_OK indicates success. For more information, see Return Values for DirectDraw.
Lock
Used by the DirectDraw API and should not be filled in by the driver.
dwFlags
Specifies a bitmask that tells the driver how to perform the memory lockdown. This member is a bitwise OR of any of the following values:
Flag | Meaning |
---|---|
DDLOCK_DISCARDCONTENTS |
This flag is a hint to the driver that it can skip the un-reordering process since the application plans to overwrite every single pixel in the surface or locked rectangle (and so erase any un-reordered pixels anyway). Applications should always set this flag when they intend to overwrite the entire surface or locked rectangle. |
DDLOCK_DONOTWAIT | On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish to override the default and use time when the accelerator is busy (as denoted by the DDERR_WASSTILLDRAWING return code) then use this flag. |
DDLOCK_EVENT | Set if an event handle is being passed to Lock, which triggers the event when it can return the surface memory pointer requested. |
DDLOCK_HASVOLUMETEXTUREBOXRECT | The driver should return a valid memory pointer to the beginning of the subvolume texture specified in the rectangle (RECTL) in rArea. The driver obtains the front and back coordinates of the subvolume from the top 16 bits of the left and right coordinates (left and right members of RECTL) respectively. The left and right coordinates are constrained to the lower 16 bits. If no rectangle is specified, the driver should return a pointer to the top of the whole volume. This value is available in DirectX 8.1 and later. |
DDLOCK_NODIRTYUPDATE |
|
DDLOCK_NOOVERWRITE | Used only with Direct3D vertex buffer locks. Indicates that no vertices that were referred to in IDirect3DDevice7::DrawPrimitiveVB and IDirect3DDevice7::DrawIndexedPrimitiveVB calls (described in the Direct3D SDK documentation) since the start of the frame (or the last lock without this flag) are modified during the lock. This can be useful when one is only appending data to the vertex buffer. |
DDLOCK_NOSYSLOCK |
|
DDLOCK_OKTOSWAP | Same as DDLOCK_DISCARDCONTENTS. |
DDLOCK_READONLY | The surface being locked will only be read from. On Windows 2000 and later, this flag is never set. |
DDLOCK_SURFACEMEMORYPTR | The driver should return a valid memory pointer to the top of the rectangle specified in rArea. If no rectangle is specified, the driver should return a pointer to the top of the surface. |
DDLOCK_WAIT | Set to indicate that Lock should wait until it can obtain a valid memory pointer before returning. If this bit is set, Lock never returns DDERR_WASSTILLDRAWING. |
DDLOCK_WRITEONLY | The surface being locked will only be written to. On Windows 2000 and later, this flag is never set. |
fpProcess
Specifies a pointer to a user-mode mapping of the driver's memory. The driver performs this mapping in DdMapMemory. Windows 2000 and later only.
Requirements
Requirement | Value |
---|---|
Header | ddrawint.h (include Winddi.h) |