Context information service – PB Docs 125

Context information service

You use the context information service to obtain information
about an application’s execution context. The service provides
current version information, as well as whether the application
is running in the PowerBuilder execution environment.

Accessing context information

Using the context information service, you can access the
information in Table 21-4.

Table 21-4: Context information

Item

Use this function

Comment

Full context name

GetName

Value returned depends on the context:

  • Default: PowerBuilder Runtime

Abbreviated context name

GetShortName

Value returned depends on the context:

  • Default: PBRUN

Company name

GetCompanyName

Returns Sybase, Inc.

Version

GetVersionName

Returns the full version number (for example,
12.5.0.1)

Major version

GetMajorVersion

Returns the major version number (for example,
12.5)

Minor version

GetMinorVersion

Returns the minor version number (for example,
0)

Fix version

GetFixesVersion

Returns the fix version number (for example,
1)

note.png Using the ClassName function for context information

You can also use the ClassName function
to determine the context of the object.

You can use this information to verify that the context supports
the current version. For example, if your application requires features
or fixes from Version 12.5.0.1, you can use the context information
service to check the version in the current execution context.

proc.png To access context information:

  1. Declare an instance or global variable
    of type ContextInformation:

  2. Create the context information service by calling
    the GetContextService function:

  3. Call context information service functions as
    necessary.

    This example calls the GetShortName function
    to determine the current context and the GetVersionName function
    to determine the current version:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x