Fovia C++ In-Process API
Getting Started

The very first task involved in using the HDVR™ API is to open up the library:

#include "hdrc/hdrc.h"
...
// when you're ready to begin using the API...
RRESULT ret;
ILibrary *pLibrary = NULL
if(ret != S_OK) {
// failed to open the library
}

As with any other DLL, you will need to link with the hdrcdll.lib file as well. You may do this under the "Link" project settings tab in Visual C++.

Note
All Interfaces that you instantiate are reference counted. You must call DecRef() on them when you are done. BCOM provides a basic smart pointer class to fascilite this process (CBComPtr).

Now that you have an ILibrary pointer you're ready to begin creating objects. Just like in COM, each object has a unique identifier. In this case it's a BGIUD. Here are the unique identifiers for each of the instantiatable objects in the library:

Here is some sample code for creating a render engine:

IRenderEngine *pEngine;
ret = pLibrary->CreateObject(&CLSID_RenderEngine, &pEngine);
// test for failure

Use this method to create any of the objects in the list. See Using RenderEngine for more details on how to use the render engine now that it's created.

See the included sample code for a more concrete example of getting a render engine up and running.