Return Values
0Successful.
-1 The scanner is already enabled.
-2 No scanner is installed or the application cannot communicate with the scanner.
Example
#include <bios.h> #include <stdio.h> #include <conio.h> #include "mmsultra.h"
void main(void) |
|
{ | // Command calls status |
short sStatus = 0; | |
unsigned uStatus = 0; | // bios_serialcom status |
int iInput = 0; | // Trigger input |
static char cBuffer[200]; | // Application buffer |
char far *pScan = NULL; | // Pointer from scan |
sStatus = scnOpenScannerShared(); | // Enable shared scanner |
if (sStatus != 0)
printf("Error opening scanner:\n%d\n", sStatus); | |
else | // Open port |
{ |
uStatus = _bios_serialcom(_COM_INIT, 0,
_COM_9600 _COM_CHR8
_COM_EVENPARITY _COM_STOP1); printf("Comm port open\n");
printf("return status: %d\nPress Enter...", uStatus); _getch();