InitFromDDSurface method
Initializes a DXSurface from an existing DirectDrawSurface.
Syntax
HRESULT retVal = object.InitFromDDSurface(pDDrawSurface, pFormatID, dwFlags);
Parameters
pDDrawSurface [in]
Type: IUnknownPointer to the DirectDrawSurface object to use to initialize the DXSurface. Specify NULL for this parameter to uninitialize a surface that was previously initialized by a call to this method.
pFormatID [in]
Type: const GUIDPointer to the pixel format. If NULL, the pixel format of the DirectDrawSurface is used. Otherwise, the DirectDrawSurface is operated on as a surface of the specified pixel format, regardless of the DirectDraw pixel format. This is used to support surfaces with an alpha channel on versions of DirectDraw that do not support alpha.
dwFlags [in]
Type: DWORDUnused; must be zero.
Remarks
Usually, you use the IDXSurfaceFactory::CreateFromDDSurface instead of calling this method directly.