The IDirect3D2 interface is the starting point for creating other Direct3D Immediate Mode interfaces. It is implemented by the DirectDraw object and can be obtained by calling the IDirectDraw2::QueryInterface method.
IDirect3D2 lets you find and enumerate the types of Direct3D devices supported by a particular DirectDraw object. It also has methods to create other Direct3D Immediate Mode objects, such as viewports, materials and lights.
The most important difference between IDirect3D2 and its predecessor, IDirect3D, is that IDirect3D2 implements an IDirect3D2::CreateDevice method. This method creates a Direct3D device that supports the DrawPrimitive methods. For more information about the devices created by the CreateDevice method, see Devices.