IDirect3DRMDevice2::InitFromSurface

Initializes a IDirect3DDevice2 device from a specified DirectDraw surface, using the IDirect3DRM2::CreateDevice method.

HRESULT InitFromSurface(
LPGUID lpGUID,
LPDIRECTDRAW lpDD,
LPDIRECTDRAWSURFACE lpDDSBack
);

Parameters

lpGUID

Address of the globally unique identifier (GUID) that identifies the Direct3D device driver to use.

lpDD

Address of the interface of a DirectDraw object that created the DirectDrawSurface.

lpDDSBack

Address of the interface of a DirectDrawSurface back buffer onto which the device will render.

Return Values

Returns D3DRM_OK if successful, or an error otherwise. For a list of possible return codes, see Direct3D Retained-Mode Return Values.

Remarks

The IDirect3DRMDevice2 device initialized will support the DrawPrimitive interface and execute buffers, and is required for progressive meshes and for alpha blending and sorting of transparent objects.