Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using COMARRAY()
Message
From
18/01/1999 11:35:34
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00177137
Message ID:
00177201
Views:
44
>Ed,
>
>Thanks for your reply. The class declaration is OLEPUBLIC and is straight out of an example which MSDN suggests we use to get a feel of COM functions in version 6.0, namely, ArrayCom.exe. I shall however delve deeper into the matter and let you know. If there's a bug out there, in ArrayCom.exe that is, it will out!

Did you compile the class into a .DLL or .EXE and invoke it by its ProgID? If so, then COMARRAY() works. If you instantiate the class from a .VCX or .PRG in your code rather than by ProgID, then there's no OLE interface, and COMARRAY() won't work. COMARRAY() only works on OLE Objects, not on VFP objects instantiated from class declarations in code or .VCX, even if they are declared OLEPUBLIC.


IOW, if I create a class, declare it OLEPUBLIC, compile it to a .DLL or .EXE and invoke it with CREATEOBJ() using the ProgID, COMARRAY() will function correctly. If I do a CREATEOBJ from the class declaration inside VFP, COMARRAY() won't work. I just tried this on one of my own COM objects here to confirm the behavior.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform