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
Miscellaneous
Thread ID:
00689246
Message ID:
00689620
Views:
33
Sergey,

Thanks, but you caught a typo in my message. I tried both of your suggestions, but no luck... It's like it doesn't recognize it, but the Object Browser has it in the list and I can see the PDF class within that as well. I just can't reference it...

>I would try
oObject = CREATEOBJECT("PDF417LIB.PDF")
>* or
>oObject = CREATEOBJECT("PDF417LIB.PDF.1")
>* but not
>oObject = CREATEOBJECT("PDF471LIB.PDF")
>
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform