GetOSVersionItem Method (RUNTIME)


10.5A

 

The GetOSVersionItem method accesses the Windows registry to retrieve version information. The method uses the following format:

 

[label]

{object}.GetOSVersionItem

[GIVING {return}] USING [*Index=]{index}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A RUNTIME object.

return

Optional. A Character String Variable that receives the version information.

index

Optional. A Numeric Variable or decimal number that identifies the version fields to be retrieved.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The EOS flag is set true if the {return} character variable is too small and the returned string is truncated.

  2. The ZERO and OVER flag are always cleared.

  3. The returned string contains one or more fields separated semicolon delimiter characters.

  4. The {index} value identifies the folder path retreived from Windows. The supported values are:

  5.  

    Value

    Retrieves ...

    0

    all version information fields This is also returned if the no paramater is specied.

    1

    the urrent major version number.

    2

    the current minor version number.

    3

    the current build number.

    4

    the current display version identifier such as "Home" or "Enterprise".

    5

    the current display edition identifier such as "Home" or "Enterprise".

    6

    the internal version such as "6.1" or "6.2".

     

  6. This method can only return version data when the data is in the registry. Otherwise, the version data field is null/empty.

  7. This method can return an error result in the {return} variable as follows:

  8.  

    "Err: Invalid item number!"

     

    The {index} value is invalid.

     

    "Err: NULL data!"

     

    The requested Windows version registry data is not found.

  9. This method is not available under Windows CE or the PL/B WebServer.

 

 

See Also: RUNTIME, RUNTIME Methods, Method Syntax

 



PL/B Language Reference GetKnownPath Method (RUNTIME) HttpRequest Method (RUNTIME)