Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CallBack and VFPCOM
Message
From
19/07/1999 21:42:11
 
 
To
19/07/1999 21:36:05
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00243400
Message ID:
00243402
Views:
26
>>>Hi,
>>>
>>>I would like to know if VFPCOM does bind to the callback of an ActiveX object. At the moment, there is not much that can be done if I want to make use of the callback function of an ActiveX object. Thanks for you help.
>>>
>>
>>No, VFPCOM can be used to bind events to VFP code, it does not provide a callback entrypoint within VFP. You'd have to write something like an .FLL or .DLL to wrap the call using another language like C++.
>>
>>If there's an event exposed by the control, you can bind VFP code using the BindEvents method of VFPCOM to tie a properly constructed VFP native class derived object to the ActiveX control.
>
>My other question is, if VFP does not support callback from other Objects is it save to say that callbacks are not widely used or not recommended method of doing asynchronous exchange of messages between objects. I would think that callbacks are very usefull for slow or long process that would run in a server and notifty the client onces the job is done. Could someone enlighten me on this subject and what is MS stand on this. Thanks in advance.
>
>Regrads,
>Kueh.

OK... not really sure what you mean by a callback... but, if you mean a windows event, yes, that is what VFPCOM.DLL is for, to capture Windows events raised by COM objects. You can already do this with ActiveX controls if you host them in an OLE container.

But, I think what you may mean is disconnected objects sedning message back to each other... I think what MS is leaning toward is MS Message Queue server. This is a delivery method that you can use to do a psuedo callback. Basically, you can send a message to a queue ment for an object/client and the client can eiter ask the Queue for messages, or it can bind to the MSMQ server object and the server will raise an event to notify the client that it has a message. You can use this with VFPCOM.DLL so you don't have to poll the server for messages.

BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform