Oc_initscanner -46 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 100

6–46
Library of Routines
OC_InitScanner
Publication 1747-6.5.3 June 1998
OC_InitScanner
This function initializes the shared memory interface between the host and scanner
and this function configures the shared memory partitioning.
Syntax:
int
OC_InitScanner(HANDLE handle, OCINIT *scaninit);
Parameters:
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;
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
scaninit
Points to the structure that contains the initialization information passed
from the application