Software for 1746 I/O
6–86 Library of Routines OC_WriteHostRetentive Data
Publication 1747-6.5.3 June 1998
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
Example:
HANDLE Handle;
BYTE retent_data[500];
int retcode;
retcode = OC_WriteHostRetentiveData( Handle, retent_data, 0, 500 );
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