![]() | InDesign SDK 20.5 |
#include <IStartupShutdownService.h>

Public Member Functions | |
| virtual void | Startup ()=0 |
| virtual void | Shutdown ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This is an Interface plugins can implement if they'd like to be called during startup and shutdown. In order to get your implementation of this interface called at startup/shutdown, you must create a new boss. like so:
resource ClassDescription (13) { kXXXStartupShutdownBoss, kInvalidClass, { IID_IK2SERVICEPROVIDER, kYYYStartupShutdownProviderImpl, IID_ISTARTUPSHUTDOWN, kXXXStartupShutdownImpl, } };
The value of kYYYStartupShutdownProviderImpl should be either kCStartupShutdownProviderImpl or kLazyStartupShutdownProviderImpl, depending on whether your Startup method MUST be call during startup or if it is okay to call your Startup method during an idle task immediately after startup. When possible, you should use kLazyStartupShutdownProviderImpl to avoid slowing down launch time. Then at startup your XXXStartupShutdown::Startup() method will be called, regardless of the implementation you choose for kYYYStartupShutdownProviderImpl above, and you can do whatever you want. Similarly your Shutdown() method will be called during app termination.
| pure virtual |
The Shutdown() method is called just prior to the Service Registry destruction.
Implemented in CstAFltStartupShutdown, PnlTrvStartupShutdown, SnipRunStartupShutdown, XCatHndStartupShutdown, CusDtLnkStartupShutdown, SCStartupShutdown, VDStartupShutdown, and ICSXSPlugPlugStartupShutdownService.
| pure virtual |
The service provider's Startup() method is called just after the Service Registry is set up.
Implemented in CstAFltStartupShutdown, PnlTrvStartupShutdown, SnipRunStartupShutdown, XCatHndStartupShutdown, CusDtLnkStartupShutdown, SCStartupShutdown, VDStartupShutdown, and ICSXSPlugPlugStartupShutdownService.