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 add an object 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
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]