Oc_writehostretentive data, Oc_writehostretentivedata -75, Syntax – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 135: Parameters: description, Return value: considerations

Publication 1747-UM002A-US-P - June 2000
Library of Routines 6-75
OC_WriteHostRetentive
Data
OC_WriteHostRetentiveData writes data to the host-retentive-data
partition of the scanner.
Syntax:
int
OC_WriteHostRetentiveData(HANDLE handle,
BYTE *buf, WORD offset, WORD len);
Parameters:
Description:
Data is not written past the end of the host-retentive-data partition.
It is recommended that you verify the integrity of the data stored in
the host-retentive-data partition. You can use the OC_CalculateCRC
function to generate a 16-bit CRC.
Data written to the host retentive data partition of the shared memory
is battery-backed, and will be retained if power is removed from the
rack, as long as the battery voltage is good.
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
buf
Contains the data that is read
offset
The data is written
offset
bytes from the beginning of the data
partition
If the number of bytes from
offset
to the end of the partition is
smaller than
len
, no bytes are written and ERR_OCPARAM is
returned.
len
Defines how many bytes to write
Name:
Value:
Description:
SUCCESS
0
host retentive data was written successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCINIT
5
scanner has not been initialized, see OC_InitScanner
ERR_OCPARAM
8
parameter contains an invalid value