Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using methods from a dll
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00447642
Message ID:
00447647
Vues:
10
>Good Afternoon,
>
>If I have built a dll named five2k in VFP6 on my machine (including regenerating component id’s) shouldn’t I be able to use the following code
>
>P2k = createobject(“five2k.five2k”) to be able to access the methods in that dll.
>
> I can’t get it to work unless I set the classlib to the particular class which defeats the purpose of creating the separate dll because the class gets compiled into the EXE and can’t be updated individually.
>
>
>I'm sure I'm missing something in the translation and would appreciate any assistance that could be provided.
>
>
>Sincerely,
>
>Michael

What you would really be doing is creating an instance of a class within the DLL, not an instance of the DLL.
To do this, there must be at least one OLEPUBLIC class in your DLL.
In a procdure DEFINE CLASS myclass AS custom OLEPUBLIC
In a visual class, check OLE Public in the first tab of the Class Info dialog.

The call should be
p2k = createobject("five2k.MyClass")
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform