Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddObject problem
Message
 
À
18/06/2002 02:42:11
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00669545
Message ID:
00669623
Vues:
15
Okay, almost there.

The final step, encpulation.
WITH pForm
	.NewObject('myContainer','interopt','gen')
	.myContainer.visible=.T.
	.myContainer.top=15
	.myContainer.left=15
ENDWITH
works great but leaves my class definition outside my DLL

I have the class library gen in my project d1

I tried
	.NewObject('myContainer','interopt','d1.dll')
but alas it errors

How do I reference an object within a class library within my dll or is it that I have not properly included the class definition within my DLL???

Regards
Geoff Scott


>Hi Geoff,
>
>I have never done this with a DLL, but have you tested NewObject() method? There is a third parameter for source.
>
>Agnes
>>Hi
>>
>>How do I reference an object within a class library in a DLL.
>>
>>I can do
>>
>>
>>WITH pForm
>>	.AddObject('myContainer','Container')  &&Add Container to form
>>	.myContainer.visible=.T.
>>ENDWITH
>>
>>
>> where I pass pForm to my DLL, but I cannot do
>>
>>
>>SET CLASSLIB TO 's:\pc source\gen.vcx' ADDITIVE
>>WITH pForm
>>	.AddObject('myContainer','interopt')  &&Add Container to form
>>	.myContainer.visible=.T.
>>ENDWITH
>>
>>
>>where interopt is a container object defined in gen.vcx.
>>
>>It works fine when not in a DLL but gives me an OLE IDispatch Error 733 telling me Class definition INTEROPT is not defined when I try to use it in a DLL.
>>
>>Can anyone tell me what I am doing wrong?
>>
>>regards
>>Geoff Scott
May all your weeds be wildflowers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform