Oc_writeoutputimage, Oc_writeoutputimage -78, Return value: considerations – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 138: Example, Syntax

Publication 1747-UM002A-US-P - June 2000
6-78 Library of Routines
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
WORD
filedata[2];
int
retcode;
filedata[0] = 0x55AA;
filedata[1] = 0xAA55;
retcode =
OC_WriteModuleFile( Handle, FILTYP_M0, filedata,
6, 3, 2 );
/* Writes words 3 and 4 from module in slot 6 */
OC_WriteOutputImage
OC_WriteOutputImage updates the output image on the scanner.
Syntax:
int
OC_WriteOutputImage(HANDLE handle,
WORD *outimgcpy, int slotnum, WORD offset,
WORD len, WORD *imagebuf);
Name:
Value:
Description:
SUCCESS
0
file was read successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCPARAM
8
parameter contains invalid value
ERR_OCRESPONSE
10
scanner did not respond to request
ERR_OCSCANCFG
14
scanner has not been configured
ERR_OCSLOT
12
slot number is invalid