Salesforce

How Do I Keep an Instance of a COM Object Available Across Programs? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Keep an Instance of a COM Object Available Across Programs? (Magic xpa 3.x)

You might have an occasion where you want to instantiate a COM object and keep it open while different programs run. To do this, define the COM object in the Main Program. Then, it will be available for any program in the Program repository. You can use Task Prefix of the Main Program to initialize the object, if needed, so it is ready for use when the programs first run.

Defining a COM object in the Main Program

  • Define the COM objects in the Data View of the Main Program just as you would if you were defining them in your task.

Now, when you are selecting a COM object, you will see the COM objects listed on the variables list at the very top, under the “Main Program” header.

Note: COM objects can also be shared by passing them between programs as parameters.

Reference
Attachment 
Attachment