Oc_readioconfigfile -56 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 110

Advertising
background image

6–56

Library of Routines

OC_ReadIOConfigFile

Publication 1747-6.5.3 June 1998

OC_ReadIOConfigFile

OC_ReadIOConfigFile reads the configuration data that is already stored in the
DOS file created using OC_WriteIOConfigFile.

Syntax:

int

OC_ReadIOConfigFile(OCIOCFG *iocfg, char *filename);

Parameters:

Description:

If G file data is included in the configuration file, OC_ReadIOConfigFile allocates memory for the data
and initializes the G data values to point to the allocated memory. The host application should release the
allocated memory via the

free()

function when it is no longer needed.

Return Value:

Considerations:

Supported in the DOS API library and the Windows NT API library

Example:

OCIOCFG

iocfg;

int

retcode;

/* DOS file named RACK1.CFG, is storing the rack configuration info. */

retcode = OC_ReadIOConfigFile( &iocfg, ”RACK1.CFG” );

/* Use OC_DownloadIOConfiguration() to download the information */

Parameter:

Description:

iocfg

A structure that contains a copy of the configuration data that is in

filename

filename

References a file that was created using OC_WriteIOConfigFile

Name:

Value:

Description:

SUCCESS

0

I/O configuration file was read successfully

ERR_OCFILERROR

19

error encountered while opening or reading the file

Advertising
This manual is related to the following products: