Microsoft DirectX 9.0

Direct3DCreate9 Function

Creates an instance of an IDirect3D9 object.


IDirect3D9 *Direct3DCreate9(      

    UINT SDKVersion );


The value of this parameter should be D3D_SDK_VERSION. See Remarks.

Return Value

If successful, this function returns a pointer to an IDirect3D9 interface; otherwise, a NULL pointer is returned.


This function creates a Direct3D9 object that supports enumeration and allows the creation of IDirect3DDevice9 objects.

The D3D_SDK_VERSION identifier is passed to this function in order to ensure that an application was built against the correct header files. This value is incremented whenever a header or other change would require applications to be rebuilt. If the version does not match, this function will fail.

Note that calling this function samples the current set of active display adapters. If the user dynamically adds adapters, either by adding devices to the desktop or by hot-docking a laptop, then those devices will not be enumerated for the lifetime of this IDirect3D9 object. Creating a new IDirect3D9 object will expose the new devices.

Function Information

Import libraryd3d9.lib
Minimum operating systems Windows 98

© 2002 Microsoft Corporation. All rights reserved.