Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Com Interfaces
Message
 
 
À
22/10/2001 12:43:09
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00571712
Message ID:
00571722
Vues:
28
Ari,
In VFP 7, you can probably do what you want using the new GetInterface() function. Ex.
objC = CreateObject("DLLName.CClass")
objI = getinterface(objC, 'IClass')
HTH.


>Hi, I created a COM component in VB as an ActiveX DLL. It has an Interface Class called IClass, which Public Not Creatable with function declarations as Public; it has also a class that implements that Interface. The CClass Class is Public MultiUse and the functions it implements are Private.
>I had no problems calling that dll from a VB Client. The code I used to call it is:
>
> Dim retval As Boolean
>
> Dim objI As DLLName.IClass
> Dim objC As DLLName.CClass
>
> Set objC = New DLLName.CClass
> Set objI = objC
>
> retval = objI.FunctionName("Parameter1", "Parameter2")
>
>I have trouble to call this dll From FoxPro, since we do not have the ability to declare variables of a certain type. (In VB I can declare objI of type IClass).
>I can create an object of CClass using the code:
>objC = CreateObject("DLLName.CClass") but I cannot call the functions because they are Private in the CClass.
>I cannot create an object of IClass (which has public functions), because it is Public Not Creatable.
>
>Any Help will be greatly appreciated
>Ari Bano
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform