Windows nt header file – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 158

Publication 1747-UM002A-US-P - June 2000
C-10 Header File
Windows NT Header File
/************************************************************************
*
* Title: 1746 I/O PCI Interface API library header file
*
* Abstract:
*
* Contains definitions, structures, and function templates for
* all functions defined in the Open Controller API. This file is
* distributed as part of the API.
*
*
* Environment:
* 1747-PCIS, -PCIS2 Bus Interface
* Microsoft Windows NT 4.0
*
* (c)Copyright Allen-Bradley
*
************************************************************************/
#ifndef OCAPI_H
#define OCAPI_H
#include
/* ************************************ */
/* ** CONSTANTS ** */
/* ************************************ */
/* ***** API Function Return Values ***** */
/* These values are returned by the API functions to indicate success or possible */
/* error conditions. */
/* */
#define SUCCESS 0 /* function returned successfully */
#define ERR_OCOPEN 1 /* scanner already open */
#define ERR_OCACCESS 2 /* handle does not have access to scanner */
#define ERR_OCMEM 3 /* shared memory cannot be found */
#define ERR_OCREINIT 4 /* scanner has already been initialized */
#define ERR_OCINIT 5 /* scanner has not been initialized */
#define ERR_OCPAR 6 /* Init failed due to invalid partition info */
#define ERR_OCPOST 7 /* scanner POST failure */
#define ERR_OCPARAM 8 /* parameter contains invalid value */
#define ERR_OCIOCFG 9 /* IO Configuration is invalid */
#define ERR_OCRESPONSE 10 /* scanner did not respond to request successfully */
#define ERR_OCEXTERR 11 /* scanner responded with an extended error message */
#define ERR_OCSLOT 12 /* slot number is invalid */
#define ERR_OCFAULT 13 /* request denied because scanner faulted */
#define ERR_OCSCANCFG 14 /* Scanner IO Configuration not downloaded */
#define ERR_OCNOFORCES 15 /* no forces installed, cannot enable forces */
#define ERR_OCOVERRUN 16 /* DII, I/O Int, or ErrReport message overrun */
#define ERR_OCOUTOFMEM 17 /* memory allocate failed */
#define ERR_OCUNKNOWN 18 /* unknown module type */
#define ERR_OCFILERROR 19 /* error occured while reading/writing disk file */
#define ERR_OCNOTSUPP 20 /* function not supported on this platform */
/* ***** Extended Error Codes ***** */
/* These values are returned in the ErrorCode member of the OCEXTERR */
/* structure that is returned from the OC_GetExtendedError() function. */
/* */
#define EERR_OCINVALIDDIR 0x01
/* Downloaded directory file is invalid */
#define EERR_OCINTSWERR 0x08
/* Internal scanner software error */
#define EERR_OCCFGCORRUPT 0x12
/* Downloaded configuration is corrupted */
#define EERR_OCEXPPWRFAIL 0x21
/* Power fail on expansion rack detected */
#define EERR_OCINVALIDDII 0x2E
/* Invalid DII input slot */