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
d1I 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')
>> .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')
>> .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