IDirect3D::CreateViewport

HRESULT CreateViewport(LPDIRECT3DVIEWPORT* lplpD3DViewport,

IUnknown* pUnkOuter);

Creates a Direct3DViewport object. The viewport is associated with a Direct3DDevice object by using the IDirect3DDevice::AddViewport method.

·Returns D3D_OK if successful, or an error otherwise, which may be one of the following values:

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

lplpD3DViewport

Address that will be filled with a pointer to an IDirect3DViewport interface if the call succeeds.

pUnkOuter

This parameter is provided for future compatibility with COM aggregation features. Currently, however, the IDirect3D::CreateViewport method returns an error if this parameter is anything but NULL.