bool InitD3D( void )

You need call it only once. It creates the D3D interface, and initialize the resources.

And it make a window for the application.

Result:

If it was not successfull, it is false