Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interpreting VB code to VFP
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Interpreting VB code to VFP
Miscellaneous
Thread ID:
00689246
Message ID:
00689246
Views:
60
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
Next
Reply
Map
View

Click here to load this message in the networking platform