How to initialize ViewPDF within C++ application?

  • Hello,

    We're having trouble to initialize the ocx/dll to view a pdf file within a C++ application wit Borland C++ Builder6.

    We imported the ocx into a package and registered the ocx with regsvr32. ViewPDF01.ocx and wPDFViewDemo01.dll are within the application directory. I can drag & drop the WPViewPDFX control on a form and use the ViewerStart method within the source code.

    When I start the application I can see a message in the WPViewPDFX control saying "WPViewPDF - DLL not loaded!". When I execute the pdfViewer->ViewerStart(WideString(path_to_dll_within_app_dir), WideString(""), WideString(""), 0); command nothing happens. When I execute the LoadFromFile method, there is no file loading!

    When I rename the file wPDFViewDemo01.dll to wPDFView01.dll within the app dir, I get an error window saying "Windowclass WPCubed_PDFVIEW_01 cannot be found!" before the main window appears.

    Could you please tell me what I'm doing wrong to initialize the library? If possible please provide a short sample code of how to integrate the ocx/dll?

    Best regards,
    Michael Voigt