GetAppInstance

(System Library)

Description: Retrieves the Layer object (LayerRoot) for a particular application specified by GUID.
Returns: Object (Layer object returned via a parameter)
Usage: Script Only.
Function Groups: Configuration Management
Related to: GetLoadedAppInstance | GetCodeObj | GetGUID
Format: System.GetAppInstance(GUID, pAppInstance)
Parameters:  
GUID
Required text. The 36-byte GUID of the application to be retrieved.
pAppInstance
A pointer to a variable. The Layer object matching the GUID will be returned via this pointer.
Comments:

The return value of this function will be an object that becomes invalid upon completion. If the Layer has not finished loading, this function will wait until it does so before returning. This is an asynchronous operation.

If the GUID does not match any known application, then Invalid will be assigned to the second parameter.

Examples:

Init [
  If 1 WorkState;
  [
    WaitObj = System.GetAppIntance(MyGUID, &TargetLayer);
  ]
]

When the function finishes, WaitObj will become Invalid.