Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Addobject and build as a DLL
Message
 
 
To
08/11/2000 17:02:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00439424
Message ID:
00439428
Views:
14
This happens because the necessary COM interface is not created to access your newly AddObjected object. However, since the object does exist, the public method AddObject fails. Two things you can do:

1. Create a public property called MyTest and assign your Custom object to it.
2. Create public wrapper methods to retrieve information about the new object.

Either way will work to provide a public interface for COM clients.

HTH.

>I got an interresting issue here :)
>
>define myclass as form olepublic
>procedure init
> this.addobject("Mytest","custom")
>return
>enddefine
>
>I build the above as a DLL (TEST.DLL)
>
>In theory when I instantiate the TEST.DLL the property MYTEST should exist. However, it not entirely true, because when you tries to access it, it is not public to all. Now let me put it in VFP code
>
>ox = crea("test.myclass")
>?ox.mytest.name
>
>Note: here I got a message on the second line
>OLE ERROR CODE 0X800000 Unknown name
>
>ox.addobejct("mytest","custom")
>
>NOTE: Now The error message say
>OLE IDispatch exception code 771 from Visual FoxPro for Windows: A member object with this name already exists...
>
>
>Now, what does it mean ??????
>
>It seem to me like the property MYTEST exist but is somewhat hidden when created by the ADDOBJECT function
>
>Need suggestion of some thoughts?????
>
>HELP !!!
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform