How to use ActiveX Interface from within Visual Foxpro 7.0

If you are a VFP developer and have any questions about using our products from VFP here is the place to post them.
Post Reply
binhluu
Posts: 1
Joined: Wed Oct 02 2002

How to use ActiveX Interface from within Visual Foxpro 7.0

Post by binhluu »

:roll:

I am using VFP7.0 with version 2.06 of PDF-Converter (Developer Edition) using the fll interface.

After I created ActiveX object in the main program

Pdf = createobject(“CDINTF.CDINTF”)

Then I made a call to

Pdf.PDFDriverInit(“My PDFPrinter”)

I got an error: “OLE IDispatch exception code 1797 for cdintf: PDFDriverInit failed”

I also tried the following and it also failed

Pdf.DriverInit(“My PDFPrinter”)

I got an error: “OLE IDispatch exception code 1801 for cdintf: DriverInit failed”

What am I doing wrong?

Any help would be appreciated.

Bihn
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

PDFDriverInit will install a printer on your system for the time your application is running. This printer will be removed at the end of your application when calling DriverEnd.
Under Windows NT/2000/XP, only administrators have the right to install and remove a printer from the system. So, if you are under these operating systems, please log in as an administrator.

DriverInit should work even if you or your users are not administrators, but DriverInit will not install a printer on your system, it will only search for an existing printer. Before calling DriverInit please install the PDF Printer on your system using Install.exe
Post Reply