Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DECLARE - DLL trouble
Message
 
To
16/09/2003 08:52:49
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00829325
Message ID:
00829587
Views:
23
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)
Previous
Reply
Map
View

Click here to load this message in the networking platform