Description
Gets the name for the current execution context.
Applies to
ContextInformation objects
Syntax
servicereference.GetName ( name )
Argument |
Description |
---|---|
servicereference |
Reference to the ContextInformation service instance. |
name |
String into which the function places the name. This argument is passed by reference. |
Return value
Integer.
Returns 1 if the function succeeds and -1 if an error occurs.
Usage
Call this function to determine the current execution environment.
The window plug-in and window ActiveX contexts are obsolete in the current version of PowerBuilder. For PowerBuilder 2017 and later applications, the only value passed for the name argument is "PowerBuilder Runtime".
Examples
This example calls the GetName function. ci is an instance variable of type ContextInformation:
String ls_name this.GetContextService("ContextInformation", ci) ci.GetName(ls_name) IF ls_name <> "PowerBuilder Runtime" THEN cb_close.visible = FALSE END IF
See also