IDirect3D::CreateLight

HRESULT CreateLight(LPDIRECT3DLIGHT* lplpDirect3Dlight,

IUnknown* pUnkOuter);

Allocates a Direct3DLight object. This object can then be associated with a viewport by using the IDirect3DViewport::AddLight method.

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

DDERR_INVALIDOBJECT

DDERR_INVALIDPARAMS

lplpDirect3DLight

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

pUnkOuter

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