Oc_getdeviceinfo -22 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 76

6–22
Library of Routines
OC_GetDeviceInfo
Publication 1747-6.5.3 June 1998
OC_GetDeviceInfo
OC_GeDeviceInfo returns information about the scanner device.
Syntax:
int OC_GetDeviceInfo(HANDLE handle, OCDEVICEINFO *devinfo);
Description:
The OCDEVICEINFO is defined as:
{
WORD
ScannerType;
/* scanner device type */
WORD
ScannerIrq;
/* allocated interrupt */
WORD
ScannerMemory;
/* dual-port memory access */
WORD
ControlIo;
/* PCIS control registers address */
WORD
SRAM_Size
/* size of available SRAM in bytes */
} OCDEVICEINFO;
handle
must be a valid handle returned from OC_OpenScanner.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library.
Description:
HANDLE
Handle;
OCDEVICEINFO
devinfo;
/* display size of available SRAM */
OC_GetDeviceInfo(Handle, &devinfo);
printf(“SRAM Size is %ld bytes\n”, devinfo.SRAM_Size);
Name:
Description:
SUCCESS
The extended error information was read successfully.
ERR_OCACCESS
handle
does not have access to scanner