IDirect3D::CreateMaterial

HRESULT CreateMaterial(LPDIRECT3DMATERIAL* lplpDirect3DMaterial,

IUnknown* pUnkOuter);

Allocates a Direct3DMaterial object.

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

lplpDirect3DMaterial

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

pUnkOuter

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