Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a class into a DLL
Message
 
À
07/04/2003 20:22:09
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00774935
Message ID:
00775380
Vues:
18
Oscar,

These are different things...

DECLARE is used in Win32 DLLs, while CREATEOBJECT() is used on COM objects. You cannot create a Win32 DLL in Visual FoxPro - you can only create COM objects...

+++ Rick ---

>Hi Rick
>
>Thanks for your reply.
>I've seen some dclare statements like this:
>declare integer myfunction in MydDllLibraryWithpath
>
>Where once declared, you only need to make a function call.
>? myFunction()
>
>This does not match with the syntax used with oClase = CreateObject()
>since a method should be called through oClase.HelloWorld()
>
>I'm confused about how to create a dll where you only make a declare statemente and next a function call.
>
>vfp seem to let you create a dll only if you have a OlePublic class but then the previous sintax:
>? myFunction
>does not apply, but the one you provided: o.HelloWorld()
>once the object has been created.
>
>What am I missunderstanding?
>
>Regards
>
>Oscar
>
>
>>>I’ve created a .dll from a custom class (olepublic). What are the exact step to call this class and its methods?
>>>
>>>Is it possible to do this with a .PRG only?
>>>
>>>Thanks in advance
>>>
>>>Oscar Corte
>>
>>What do you mean exactly?
>>
>>The following will create the object and call it:
>>
>>
>>o = CREATEOBJECT("YourProject.YourClass")
>>o.HelloWorld()
>>
>>
>>In a VBA type language you'd add this the DLL or EXE to the project references and then declare the object as the ProgId (YourProject.YourClass).
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform