IDirectDraw::CreateSurface
This method creates a DirectDrawSurface object for this DirectDraw object.
HRESULT CreateSurface(
LPDDSURFACEDESC lpDDSurfaceDesc,
LPDIRECTDRAWSURFACE FAR* lplpDDSurface,
IUnknown FAR* pUnkOuter
);
Parameters
lpDDSurfaceDesc
Address of a DDSURFACEDESC structure that describes the requested surface. You should set any unused members of the DDSURFACEDESC structure to zero before calling this method. A DDSCAPS structure is a member of DDSURFACEDESC.lplpDDSurface
Address of a variable that will be set to a valid IDirectDrawSurface interface pointer if the call succeeds.In all cases, call IDirectDrawSurface::QueryInterface to obtain a pointer to an IDirectDrawSurface interface and then use the IDirectDrawSurface interface for all of your DirectDraw programming in Windows CE.
pUnkOuter
Allows for future compatibility with COM aggregation functionality.Presently, however, this method will return an error if this parameter is anything but NULL.
Remarks
DirectDraw does not support emulated surface flipping. Surface flipping in DirectDraw requires hardware support.
If your device does not support hardware flipping and you specify DDSCAPS_FLIP, the operation will fail with the DDERR_NOFLIPHW error code.
Return Values
If the method succeeds, the return value is DD_OK.
If the method fails, the return value may be one of the following error values:
Requirements
Pocket PC: Windows Mobile 5.0 and later
Smartphone: Windows Mobile 5.0 and later
OS Versions: Windows CE 5.01 and later
Header: Ddraw.h.
Library: Ddraw.lib.
Send Feedback on this topic to the authors