Function Reference 4-61
Example
#include <conio.h>
#include <stdio.h>
#include "mmsultra.h"
void main(void)
{
char *pStatus2 = NULL;
// Pointer to cBuffer
char cBuffer[100];
// Application buffer
short sStatus1 = 0;
// Command calls status
int iInput = 0;
// Trigger input
sStatus1 = scnOpenScanner();
// Enable scanner
if (sStatus1 == -2)
printf("Scanner open error-- %d", sStatus1);
else
{
// Perform scan
printf("Press trigger to\nscan...\n");
iInput = _getch();
if (iInput == 0)
{
iInput = _getch();
if (iInput == 0x85)
{
pStatus2 = scnGets(cBuffer);
if (pStatus2 == NULL)
printf("Scanner buffer read error\n");
else
{
spkBeep(1, 1000);
// Beep for success
// Display result
printf("Scan data:\n %s\n", cBuffer);
}
}
}
}
sStatus1 = scnCloseScanner();
// Disable scanner
}
Содержание Gold 6037EX
Страница 1: ... ROG TC6037EXPM Rev AA 8 03 Printed in the U S A 2003 Paxar Americas Inc All rights reserved ...
Страница 2: ... Trademarks 0 1 2 0 0 3 4 5 6 7 78 ...
Страница 10: ...viii Table of Contents ...
Страница 30: ...2 16 Programmer s Manual ...
Страница 36: ...3 6 Programmer s Manual ...
Страница 154: ...4 118 Programmer s Manual ...
Страница 228: ...14 Index ...
Страница 229: ......
Страница 230: ......