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
Divers
Thread ID:
00689246
Message ID:
00689620
Vues:
34
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform