Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DECLARE - DLL trouble
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00829325
Message ID:
00829587
Vues:
24
Two possible workarounds

(1)
Declare SER_SEND with parameter passed by reference:
DECLARE INTEGER SER_SEND IN sersen04 STRING @
(2)
Create a small pause before closing serial port

Combine (1) and/or (2):
DECLARE INTEGER SER_OPEN IN sersen04 INTEGER, INTEGER 
DECLARE INTEGER SER_CLOSE IN sersen04 
DECLARE INTEGER SER_SEND IN sersen04 STRING @

= SER_OPEN(1,9600)

LOCAL cMessage
cMessage = "This is a test" + Chr(0)
= SER_SEND(@cMessage)

DOEVENTS  && may be even add INKEY(2)

= SER_CLOSE()
* * *
Actually SER_CLOSE does not look consistent in your message. There might be a parameter -- serial port number. May be changing declaration to the following will help:
DECLARE INTEGER SER_CLOSE IN sersen04 INTEGER
= SER_CLOSE(1)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform