![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/b/d9/bd9e30cc-fc90-405c-8c02-9bf3135ac56c/bd9e30cc-fc90-405c-8c02-9bf3135ac56c-bg63.png)
Function Reference 4-63
scnGetScannedData
Description
Retrieves the scanner buffer’s contents as a null-terminated
string, placing them in a programmer-defined application buffer.
If the scanner buffer is empty, this function does not activate
the trigger to start a scan. This function works with each
scanner.
If there is any chance the scanned bar code
contains a binary zero, do not use this
function. Instead, use scnGetch and
scnScannerHit in a loop until the scan is
complete.
Use scnGets to retrieve the scanner buffer’s contents and
activate the scanner when the buffer is empty.
Syntax
short far scnGetScannedData(char far *lpszData);
Parameters
lpszData
A pointer to a programmer-defined application buffer
where the function places the scanner buffer’s contents.
This buffer must be one byte longer than the largest
string that you may scan.
Return Values
0
No data available.
-1
Checksum, time-out, or communications error.
-2
Decoding fault. The scanner scanned the bar code, but
the printer could not decode it.
-9
Scanner is disabled.