Pausing Applications

Pausing an application is similar to disabling an application, except it is used to disable a particular running application only, and the paused status does not survive an application shutdown. To pause a running application, open the Running Processes folder and select Pause from the application context menu. A paused application has a paused icon on it (like a player’s Pause button), while a running application has a play icon (like a player’s Play button). To resume a paused application, select Resume from its context menu (see Figure B-6).

PCOM+ 1.5 running application Activation tab

Figure B-6. PCOM+ 1.5 running application Activation tab

To pause an application programmatically, use the ICOMAdminCatalog2 interface and the PauseProcess( ) method. The ResumeProcess( ) method is used to resume the application, and the IsProcessPaused( ) method allows you to find out the status of the application. The definitions of these methods follow:

[id(0x1c)] HRESULT PauseProcess([in] BSTR bstrApplInstanceId);
[id(0x1d)] HRESULT ResumeProcess([in] BSTR bstrApplInstanceId);
[id(0x1e)] HRESULT IsProcessPaused([in] BSTR bstrApplInstanceId,   
                                    [out,retval]VARIANT_BOOL* bPaused);

Get COM & .NET Component Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.