Browse Prior Art Database

Provide an Application Program Interface to Manage the Config.Sys Type Files

IP.com Disclosure Number: IPCOM000117497D
Original Publication Date: 1996-Mar-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 4 page(s) / 126K

Publishing Venue

IBM

Related People

Ibanez, JG: AUTHOR [+3]

Abstract

Most OS/2* products make changes to CONFIG.SYS. These products have specific code to update the CONFIG.SYS file (in some cases it may even be hard coded). When future changes are added, entire new routines will be needed to support any changes to the CONFIG.SYS file.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 39% of the total text.

Provide an Application Program Interface to Manage the Config.Sys
Type Files

      Most OS/2* products make changes to CONFIG.SYS.  These products
have specific code to update the CONFIG.SYS file (in some cases it
may even be hard coded).  When future changes are added, entire new
routines will be needed to support any changes to the CONFIG.SYS
file.

      This Application Program Interface (API) provides a generic
mechanism to support all CONFIG file changes.  Thus, reducing the
amount of code being written and supported.

      This API may be used to update the CONFIG.SYS file or other
files with a similar format.

      This API may be used to make multiple changes to the files at
the same time.
  APIRET LciUpdateConfigSys(CHAR *pszUpdateFile, struct CS_UPDATE
   *pUpdates);
  PARAMETERS:
  PSZUPDATEFILE  The name of the file to perform the updates on.
  PUPDATES       This is the address of the first element in a
                  chain of CS_UPDATE structure items.  The structure
                  and enumerations are referenced below.

      This API uses the fields in the CS_UPDATE structure as
described below:
  ELINETYPE      Type of config.sys line being acted upon.
  EACTION        The action to perform on the line.  If the action
                  is not valid for the ELINETYPE specified,
                  ULRETURNCODE will be set to INVALID_PARAMETER.
  PSZOTHERLINE   This is accessed only when ELINETYPE is
                  EOTHERCOMMANDLINE or ESETOTHERPATH, and contains
                  the command or path statement.  If the command
                  has an equal sign(=), it must be part of in this
                  string.
  PSZNEWVALUE    A string containing the new value for the line or
                  path entry.  This API does no testing of this
                  string.  You are responsible for setting this
                  string correctly.  For example, if you include the
                  equal sign (=) at the start of this string, and use
                  one of the recognized line types, the resulting
                  file will contain two equal signs (==).
  PSZSEARCHSTRING   This string is only accessed when EACTION is
                  EADDBEFOREMATCH, EADDAFTERMATCH, EREMOVEPATHPART,
                  EREPLACEPATHPART, ECHANGE, ECOMMENTOUT, or EREMOVE,
                  and is a search string.  If the search string is
                  not found, the update will not be made and
                  ULRETURNCODE will be set to NOT_FOUND.  If you
                  specify one of the known line types, do NOT...