Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameter Limit in FLL ?
Message
From
16/01/2001 01:07:38
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00463814
Message ID:
00464086
Views:
16
>>>>> There are a lot of resources, too many to name any specific one. It all begins with the question of which tool you use. You can use any language that is available in VS. For VC++ there are several different kind of COM server, as well. <<<<
>
>Sounds great Christof. From your reply you made it sound like I could write a COM server that works with VFP using VB. 1. Is this do-able. 2. Where can I find resources on that?
>

(1) Yes - a COM server written in VB is generally usable from VFP - you instantiate the VB COM server and interact with the exposed methods, collections and properties of the COM server. VFP data is handled as variant data when crossing the COM interface. I've had poor results using SafeArrays() as parameters crossing the COM interface; if you can accept the overhead of issuing multiple COM exchanges, I've had much less trouble relying on collections to convey variable-element information sets, or created a named pipe as an interprocess communicationconveyance; the COM object would create a bidirectional pipe and publish it to the client as a property, and streams of variable-length data would be written to the pipe, which would be read by the server on a method call, and retreiving a vaiable-length stream from the server would have the server write a stream to the pipe, to be read by the client on return from the method call. It's not a trivial process, but it limits the number of COM calls, has a relatively low overhead per exchange, and functions in-process, locally out-of-process and remotely out of process. It does require that the server run under NT or Win2K, since while Win9x can access named pipes, NT and Win2K only may create named pipes.

(2) Chapter 16 of the On-Line Help file entitled "Adding OLE". There are also lots of white papers on the msnd.microsoft.com/vfoxpro site covering using COM.

>Also one other random though as I shamelessly pick your brain…J
>Since the VFP objects get COM wrappers, then it should be possible to fire methods on those COM wrapped VFP objects?
>

Yes you can invoke public methods of VFP-created COM servers. VFP servers cannot sink or source events, and you can't create an ActiveX control using VFP - VFP in-process COM servers can't have any UI elements.
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