How to call html to pdf asp.net library from a C++ Native Windows Application.

First you should register the HiQPdf classes for COM clients and produce a type library file by executing the following command in an Administrator command prompt:

regasm HiQPdf.dll /tlb:HiQPdf.tlb

The HiQPdf.tlb will be included in the C++ application code to offer the prototypes for HiQPdf classes and methods. The compiler will produce a C++ header file named HiQPdf.tlh from the TLB file, containing the HiQPdf library types and methods prototypes.

The HiQPdf.dll and HiQPdf.dep files must be copied near the application executable or otherwise you have to install the HiQPdf.dll in GAC to make it available for COM infrastructure. The C++ code of a simple console application which converts an URL and saves the resulted PDF document to a file on disk looks like below: