Program Information File


 

The PLBWIN program information file (PLBWIN.INI) file contains information that allows the user to tailor the runtime.

 

The .ini file name processing occurs as follows:

  1. The runtime qualifies and uses an INI file when the file contains any section header. A section header is an INI file record that starts with '[' and is terminated with a ']'.

  2. The runtime looks for and uses an INI filename found in three possible directories. The runtime always processes the INI files in the same order giving the user the ability to override globally defined parameters. The file name searching is as follows:

  3. If the runtime is started without using the '-i' option, the runtime looks for the default INI file named 'PLBWIN.INI' in the three possible areas. Any PLBWIN.INI files found in the three directories are then used to locate requested INI file keywords in the order as described in (B) above.

  4. If the runtime is started with the '-i' option being specified and the INI file name does not have a path specified, the runtime looks for the INI file name in the three possible directories defined in (B) above. The runtime only processes the user named INI file from the three directories defined in (b.) above. This means the 'PLBWIN.INI' is NOT used in this case.

  5. If the runtime is started with the '-i' option being specified and the INI file name does have a path specified, the runtime looks for and uses the single specified INI file if found. This case disables the runtime from processing multiple INI files as described in (B) above.

 

Keywords with an associated value are place in sections. The sections are indicated by surrounding the section name with square brackets. The [version] and [environment] sections are required and at a minimum must contain the following keywords and values:

 

[version]

Interpreter=8.4

 

[environment]

PLB_TERM=ANSI

PLB_SYSTEM={directory containing above files}

PLB_PATH={paths of user programs (.plc), data (.txt) and index (.isi and .aam) files)}

 

Within the [environment] section, the user may specify additional Runtime Keywords.

 

The user can initiate a file version check by adding a section to the INI file named [vercheck]. In this section, the user specifies file entries that identify file names and expected file version. When a specified file does not meet the specified version, a U38 error occurs. A diagnostic value indicates what kind of error was encountered and the entry number causing the error is provided. The file version checking can only be used for files generated as 32 bit modules.

 

The format of each entry in the [vercheck] section must begin with a keyword identified as 'VERSIONnnn'. The 'nnn' value must be a sequential number from one to 999. The entries must be incrementing values without any breaks in the number sequence. The format of an entry is as follows:

 

VERSIONnnn=[ws][{os}][ws]"{filename}"[ws]{op}[ws]{version}

Where:

nnn
Keyword sequence identifier that must start with a value of one and increment sequentially by a value of 1 for specified entries. There cannot be any breaks in the sequential numeric values.
[ws]
is optional white space character(s).
{os}
is the optional operating system field that controls the validation for the line entry. The field format is "@nnn" where:
 

@

Optional character that identifies when the {filename} file cannot be located, the line entry validation is ignored and no error is reported.

nnn

Numeric value that identifies the OS type for which a line entry file is validated. The acceptable values are as follows:

1 - Windows NT

2 - Windows 3.1x

3 - Windows 95

4 - Windows 98

 

If the 'nnn' value is zero, it is the same as if no value is specified. Any other value than those above will cause a U38 error with diagnostic value of '10xxx' where ‘xxx' is the line entry number.

 
{filename}
File name to test for a specified file version value. {filename} must be enclosed between double quotes and can have a full path specified. The file being tested must contain a valid Microsoft file version. This can be checked by viewing the file properties under the Windows Explorer.
{op}
This can be an appropriate operator defined as one of the following:
= Equal
> Greater than
< Less than
>= Greater than or equal
<= Less than or equal
<> Not equal
{version}
Microsoft file version value. This value can be determined by using the Windows Explorer to view the properties of a file. This value is a numeric value is a file version given in one of two formats. Both of the supported formats translate into two 32 bit values representing the file version and the file build values.
 
The first format is 'xx.yy.nnnn' where:
 
xx
Version value high word
yy
Version value low word
nnnn
Version build number
 
The second format is 'xx.yy.aa.bb' where:
 
xx
Version value high word
yy
Version value low word
aa
Version build value high word
bb
Version build value low word
 

Note:

  1. The 'nnnn' value specified in the first format can be calculated using the 'aa' and 'bb' value specified in the second format as follows:

 

nnnn = ( aa << 16 ) + bb

Example 1:

 

[vercheck]

VERSION001 = "vredir.vxd" = 4.00.1116

VERSION002 = "plbwin.exe" = 8.4.1120

 

Example 2:

[vercheck]

 

VERSION001="filename">nnn.nn

;Error for all cases

VERSION002=@"filename">nnn.nn

;Do not give error when file cannot be found.

VERSION003=3"filename">nnn.nn

;Always give error when file ;cannot be found when running;under Windows 95. Ignore otherwise.

VERSION004=@1 "filename">nnn.nn

;Do not give error when file cannot be found;when running under Windows NT. Ignore;otherwise.

 

Example 3:

[vercheck]

VERSION001="libeay32.dll" >= 1.0.65543

 

or

 

[vercheck]

VERSION001="libeay32.dll" >= 1.0.1.7

 

 

When the first file version failure is detected, a U38 error is given with a diagnostic value to clarify the error.

 

When a diagnostic value is greater than 1000, the high order digit of the diagnostic value indicates the type of error encountered and the lower three digits (nnn) indicates the entry number in the [vercheck] section for which the problem has occurred.

 

The diagnostic subcode values are as follows:

 

Subcode

Meaning

1

Unable to load VERSION.DLL library.

2

Unable to access VERSION.DLL library functions.

1nnn

The file name for the nnnth entry does not begin/end with a double quote or the file name is determined to be invalid.

2nnn

The nnnth entry has an invalid operator specified.

3nnn

The nnnth entry has data following the version number that is not allowed.

4nnn

The file for the nnnth entry cannot be found.

5nnn

The file for the nnnth entry does not have version information available. This could also occur when the file does not exist.

6nnn

The file for the nnnth entry has file version data too large to be processed by the runtime.

7nnn

The file version data cannot be retrieved for the nnnth file.

8nnn

The runtime is unable to query or use the file version data retrieved for the nnnth file.

9nnn

The file version data has failed to meet the test condition specified for the nnnth entry.

 

Note that the file version data retrieved for a file is stored in the PLBWIN.LOG file when the '-d3' internal debugging option is used.

 

The Windows runtimes to allow a drive specification in all PLB filenames to be substituted with a user assigned string. This support is implemented as a straight string for string substitution where the runtime does not interpret or format the filename string as the substitution is performed. However, after the substitution is performed, a double path delimiter string (ie "\\") is replaced with a single path delimiter (ie "\").

 

The drive substitution is enabled by including a new section named [SubstDrives] in the runtime '.ini' configuration file. The [SubstDrives] includes any MSDOS drive specifications to be substituted as PLB instructions process the filename. The following drive substitution assignments are all valid:

 

[SubstDrives]

l:=q:

m:=r:\mydir\

x:=\\computername\share\

y:=\\computername\share\somedir\

 

See the Windows Drive Substition topic in Disk IO section of the PLB Language Reference for additional information.

 

 

See Also: PLBWIN Command Line, PLBWIN Runtime Requirements, PLBWIN Keywords, Compiler and Runtime Options

 



Compiler and Runtime Options PLBWIN Command Line PLBWIN Runtime Requirements