Oc_openscanner, Oc_openscanner -41 – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual

Page 101

Advertising
background image

Publication 1747-UM002A-US-P - June 2000

Library of Routines 6-41

scaninit.InputImageSize = 128; / * 64 words for input image */

scaninit.OutputImageSize = 128; / * 64 words for output image

*/

scaninit.HostRetentiveDataSize = 500; / * 256 words for host

data area */

retcode = OC_InitScanner( Handle, &scaninit );

OC_OpenScanner

OC_OpenScanner acquires access to the scanner device and sets a
unique ID that the application uses to access the scanner in
subsequent functions.

Syntax:

DOS

int

OC_OpenScanner(HANDLE *handle, 0, 0);

(OCE only)

int

OC_OpenScanner(HANDLE*handle,

WORD segaddr, BYTE irqnum)

NT

int

OC_OpenScanner(HANDLE *handle);

Description:

This function must be called before any of the other scanner access
functions can be used.

segaddr defines the segment address of the scanner’s shared memory
in the host processor’s memory map. segaddr must contain one of the
segment addresses in Table 2. Otherwise, the scanner cannot be
opened.

IMPORTANT

The two argument values of zero are ignored by the
DOS API function. They are a carryover from the
Open Controller API.

ATTENTION

!

After OC_OpenScanner has been called,
OC_CloseScanner must be called before exiting the
application.

Advertising
This manual is related to the following products: