Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Winsock
Message
From
02/02/2008 06:25:41
 
 
To
01/02/2008 15:49:25
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01288289
Message ID:
01288462
Views:
12
I have a terminator which is a chr(13).
So, what getData returns is "1234chr(13)5678chr(13)".
Why is that happening? Is there a way to clear buffer or whatever completely to avoid that?

>Any chance of configuring the scanner to send a preamble and terminator on the scan string? Be easy to parse out multiple scans in that case.
>
>>I am using a winsock OCX to receive data from a TCP/IP device with a scanner attached.
>>Here is my code to get data:
>>
>>*** ActiveX Control Event ***
>>LPARAMETERS bytestotal
>>LOCAL strData
>>strData = SPACE(255)
>>This.Object.GetData(@strData)
>>
>>I am checking bytestotal for every scan. While barcode has 5 chars I am recieving 12 sometimes and strData might look like this:
>>"abcde 12345"
>>
>>where abcde 12345 are two consecutive scans. Do I need to do some kind of buffer clearing or something?
>>
>>Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform