Information générale
Catégorie:
Fonctions Windows API
Titre:
Accessing another software
I try to send a command to telnet QWS3270P but it doesn't respond anything. does anyone know how ???
this is a source I wrote :
clea
*** Set Visual FoxPro up as a DDE server ***
= DDESetService('QWS3270P', 'DEFINE')
= DDESetService('QWS3270P', 'EXECUTE', .T.)
= DDESetService('QWS3270P', 'POKE', .T.)
= DDESetTopic('QWS3270P', 'SESSIONA', 'DOTOPIC')
= DDESetOption('SAFETY', .T.)
WAIT WINDOW 'Server portion service setup ... '
*** Use Visual FoxPro as a DDE client ***
gnChannel = DDEInitiate('qws3270p','SESSIONA')
?DDEPOKE(gnChannel, ', 'key"home" type"type" key"tab" type"Acctno"')
?DDELASTERROR()
=DDETerminate(gnChannel)
PROCEDURE dotopic
PARAMETERS gnChannel, gcAction, gcItem, gData, gcFormat, gnAdvise
glResult = .F.
DO CASE
CASE gcAction = 'INITIATE'
glResult = .T.
CASE gcAction = 'ADVISE'
wait wind tran(gdata,"@!")
glResult = .T.
CASE gcAction = 'EXECUTE'
wait wind tran(gdata,"@!")
glResult = .T.
CASE gcAction = 'POKE'
WAIT WIND tran(gdata, "@")
glresult = .T.
CASE gcAction = 'REQUEST'
WAIT WIND tran(gdata, "@")
glresult = .T.
CASE gcAction = 'TERMINATE'
WAIT WINDOW 'Goodbye ... '
glResult = .T.
ENDCASE
RETURN glResult
Thanks in advance
Rizka Arifianto
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