IDirectDraw7::CreateSurface
The IDirectDraw7::CreateSurface method creates a DirectDrawSurface object for this DirectDraw object.
HRESULT CreateSurface(
LPDDSURFACEDESC2 lpDDSurfaceDesc2,
LPDIRECTDRAWSURFACE7 FAR *lplpDDSurface,
IUnknown FAR *pUnkOuter
);
Parameters
- lpDDSurfaceDesc2
- Address of a DDSURFACEDESC2 structure that describes the requested surface. Set any unused members of the DDSURFACEDESC2 structure to 0 before calling this method. A DDSCAPS2 structure is a member of DDSURFACEDESC2.
- lplpDDSurface
- Address of a variable to be set to a valid IDirectDrawSurface7 interface pointer if the call succeeds.
- pUnkOuter
- Allows for future compatibility with COM aggregation features. Presently, however, this method returns an error if this parameter is anything but NULL.
Return Values
If the method succeeds, the return value is DD_OK.
If it fails, the method can return one of the following error values:
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in ddraw.h.