Description, Return value: considerations, Example – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 100

Publication 1747-UM002A-US-P - June 2000
6-40 Library of Routines
Description:
If the scanner is executing POST when this function is called,
ERR_OCPOST is returned.
If the scanner has been previously initialized and the partition
information in
scaninit
is identical to the current scanner
partitioning, OC_InitScanner returns successfully.
If the scanner has been previously initialized and the partition
information in
scaninit
is different from the current scanner
partitioning, OC_InitScanner returns an error value that indicates that
the scanner was previously initialized. The scanner must be reset via
OC_ResetScanner before the initialization information can be
changed. If the scanner has already been initialized, you can call
OC_GetScannerInitInfo to retrieve current partition information.
The
OCINIT
structure is defined as:
typedef struct tagOCINIT
{
WORD
OutputImageSize; / * size in bytes */
WORD
InputImageSize; / * size in bytes */
WORD
HostRetentiveDataSize; / * size in bytes */
} OCINIT;
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
OCINIT
scaninit;
int
retcode;
Name:
Value:
Description:
SUCCESS
0
scanner was initialized successfully
ERR_OCACCESS
2
handle
does not have access to the scanner
ERR_OCMEM
3
shared memory not found
ERR_OCPAR
6
initialization failed due to invalid partition information
ERR_OCPOST
7
POST in progress or scanner POST failed, see
OC_GetScannerStatus
ERR_OCREINIT
4
scanner has already been initialized
ERR_OCRESPONSE
10
scanner did not respond to request