Oc_readoutputimage -59 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 113

Advertising
background image

OC_ReadOutputImage

Library of Routines

6–59

Publication 1747-6.5.3 June 1998

OC_ReadOutputImage

OC_ReadOutputImage reads the current output image from the scanner.

Syntax:

int

OC_ReadOutputImage(HANDLE handle, WORD *outimgcpy, int slotnum,

WORD offset, WORD len, WORD *imagebuf);

Parameters:

Description:

Since the scanner never changes data in the output image, it is not necessary to copy the image, as with the
OC_ReadInputImage function, to preserve file integrity. It is supported, however, to provide a consistent
interface.

Return Value:

Considerations:

Supported in the DOS API library and the Windows NT API library

Parameter:

Description:

handle

Must be a valid handle returned from OC_OpenScanner

outimgcpy

If

outimgcpy

is:

NULL

OC_ReadOutputImage reads data directly from the output
image in the scanner’s shared memory.

not NULL OC_ReadInputImage reads data from

outimgcpy

which

contains a copy of the scanner’s output image.

slotnum

offset

len

If

slotnum

is positive, the output image for that slot is read into the array

pointed to by

imagebuf

. Then

imagebuf

is filled with

len

words of

output data starting at word

offset

of the module in the slot.

If

slotnum

is -1, the entire output image is read into the array pointed

to by

imagebuf

, and

offset

and

len

are ignored.

imagebuf

Must point to an array that is large enough to accept the amount of data
in the requested output image

Name:

Value:

Description:

SUCCESS

0

output image was read successfully

ERR_OCACCESS

2

handle

does not have access to scanner

ERR_OCPARAM

8

parameter contains invalid value

ERR_OCSCANCFG

14

scanner has not been configured

ERR_OCSLOT

12

slot number is invalid

Advertising
This manual is related to the following products: