C - header file, Introduction, Dos header file – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 149: Appendix c, Header file, Appendix

1
Publication 1747-UM002A-US-P - June 2000
Appendix
C
Header File
Introduction
The API comes with a header file (
ocapi.h
) that defines:
•
error code values
•
status values
•
type definitions
•
structures
•
function prototypes
DOS 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
* MS-DOS
* Borland/Microsoft C/C++ Compiler (16-bit)
*
* (c)Copyright Allen-Bradley
*
************************************************************************/
#ifndef OCAPI_H
#define OCAPI_H
/* ************************************ */
/* ** 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 */