Information générale
Titre:
Set-up DDE client/server within Form's INIT Method
I am trying to enable asynchronous DDE comunications between my VFP5 app and a C program. I have succeeded with DDE between two VFP 'prg' files each running under a seperate Windows' session. I want to duplicate this using VFP SDI forms.
I have the following code in one of my Form's INIT Method:
* Set-Up Server
=DDESetService('VFP','DEFINE')
=DDESetService('VFP','EXECUTE',.T.)
=DDESetService('VFP','REQUEST',.T.)
=DDESetService('VFP','POKE',.T.)
* Set-Up our main topic and the UDF name that
* will handle the DDE message we are processing.
WITH This
.cItem = 'MYCMD'
= DDESetTopic('VFP',.cItem,'Thisform.dispatch')
* Become Client for C++ program
.nChannel = DDEInitiate('CPP',.cItem)
ENDWITH
When I run the form, I get an error while the program tries to execute the command :
= DDESetTopic('VFP',.cItem,'Thisform.dispatch')
For some reason, VFP doesn't recognize 'Thisform.dispatch' as a valid UDF which is meant to be executed when the Server sends data back to the form.
I need to initialize DDE comunication from within a form so that I can display data sent to me from the DDE Server.
What to do?
Any help is appreciated...
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement