A SERVICE OF

logo

4-70 Programmer’s Manual
Return Values
0
Successful.
-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)
{
short sStatus = 0; // Command calls status
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();