Oc_readhostretentive, Data -52 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 106

Advertising
background image

6–52

Library of Routines

OC_ReadHostRetentive Data

Publication 1747-6.5.3 June 1998

OC_ReadHostRetentive
Data

OC_ReadHostRetentiveData reads the host-retentive-data partition of the scanner.

Syntax:

int

OC_ReadHostRetentiveData(HANDLE handle, BYTE *buf, WORD offset, WORD len);

Parameters:

Description:

Data is not read 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.

Important:

The jumper for the battery-backup dual-port memory is disabled by
default. You must switch the jumper to enable the battery-backup
feature.

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 read

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 will be read and ERR_OCPARAM is returned.

len

Defines how many bytes to read

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 invalid value

Advertising
This manual is related to the following products: