Moving DirectX 3 Applications to DirectX 5

Although DirectX 3 applications will work unchanged in DirectX 5, DirectX 3 applications should be modified if the new DirectX 5 features are to be used. The main change required is use the new Direct3D device model described in Objects and Interfaces. Retrieve an IDirect3D2 interface from DirectDraw instead of IDirect3D and then use the IDirect3D2::CreateDevice method to create the device object. You can continue to use the IDirect3DDevice interface just as you did previously by calling the IDirect3DDevice2::QueryInterface method to retrieve the IDirect3DDevice interface. The only difference is that if you previously called IDirect3DDevice::QueryInterface to retrieve an IDirectDrawSurface interface, you should instead call IDirect3DDevice2::GetRenderTarget.