Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interpreting VB code to VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Interpreting VB code to VFP
Divers
Thread ID:
00689246
Message ID:
00689246
Vues:
59
Hi,

I am attempting to work with a new COM object and cannot figure out how to instantiate it within VFP. Here's some sample code for VB, but I've done everything that I know to get it to work:

'Create a Visual Basic function to call the DLL from within your application
Public Function EncPDF(DataToEncode As String, EcLevel As Integer, TotalColumns As Integer, TotalRows As Integer, Truncated As Integer, PDFMode As Integer, ApplyTilde As Integer) As String
Dim PDF417FontEncoder As PDF417Lib.PDF
Set PDF417FontEncoder = New PDF
PDF417FontEncoder.FontEncode DataToEncode, EcLevel, TotalColumns, TotalRows, Truncated, PDFMode, ApplyTilde, EncPDF
End Function

I figured that the basic call would be as follows:
oObject = CREATEOBJECT("PDF471LIB.PDF")

That didn't work, so I looked further. The name of the file is IDAUTOMATIONPDF417.DLL. It is defined in the Object Browser as IDAutomationPDF417Barcode, so I tried each of the following:
oObject = CREATEOBJECT("IDAUTOMATIONPDF417.PDF")
oObject = CREATEOBJECT("IDAUTOMATIONPDF417BARCODE.PDF")

None of the things I have done have worked. I have verified that the DLL is registered and it is working from within Access using the above example code.

Can anyone help! Please!!!
Rod Lewis
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform