Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Window's User Events, Callbacks etc.
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00460314
Message ID:
00460565
Views:
12
>>Hey GT,
>>
>>But you can "two-step boogie" if you have to can't you? You can wrapper the DLL in a VB component that raises events as appropriate and then use VFPCOM to bind a VFP app to these events. Also, maybe, there are things going on in that VB code that may be unnecessary to what Eylon is trying to do? I think the answer to the original question requires more information about the DLL and how it operates.
>>
>>>Simply put the answer is you can't do this in VFP. On the most basic level the reason is that there's no way to pass the address of the callback function (as you can do with VB via the AddressOf operator). Further, VFP's handling of messages is decidedly non standard. Sorry.
>
>
>So, now you are preempint my next question. Can I "reach out" to the VB app from VFP? And, forgive my ignorance - what is VFPCOM and how do I use it?
>
>The dll has a bunch of functions that read trading data from our SE and transmits it to various (software) clients PB etc. we have an app in VFP that currently reads data through DDE which is very slow - so we want to upgrade it to this.

In addition to what George says, when you install VFPCOM utility, there will be samples and docs. In general, VFPCOM serves two main purposes:

First, it helps you to work with ADO (for example you can convert ADO recordset to cursor and back with VFPCOM methods RStoCursor() and CursorToRS() ).

Second, it can get all the methods names exposed by some COM server and create a template of a VFP class with the exposed methods (using the same names) and when the COM server and the class created from the template are instantiated it can bind their events with BindEvents() method, so when the event in COM server fires, the corresponding event in your VFP class instance fires too.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform