Calling CVL Display API from Your Own DLL

If you create your own DLL that initializes CVL display objects and calls their functions, then you must call cfInitializeDisplayResources() in your application’s initialization and setup code.

This is required because the resources for CVL display windows (the menus, buttons, strings, and so on) are embedded in the CVL DLL that contains the display functionality, cogdisp.dll. (CVL ships with eight versions of cogdisp.dll, covering the ANSI, Unicode, release, and debug versions for the two supported compilers, as described in CVL Libraries for Visual C++ .NET 2012, 2013, and 2015.) When your application calls a CVL display API in your DLL, Windows looks in your DLL for the necessary resources, but does not find them there. Calling cfInitializeDisplayResources() in your application informs Windows that the CVL display resources are to be found in cogdisp.dll, and not in your DLL.

Your application must call cfInitializeDisplayResources() if your application instantiates a ccWin32Display or ccDisplayConsole object in a DLL instead of in your application’s executable.

In all other cases, the work performed by cfInitializeDisplayResources() is redundant and benign, but your application can call it without producing an error.