Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Generated using TypeDoc
nsINativeAppSupport
This "pseudo" (in the XPCOM sense) interface provides for platform-specific general application support
Due to the nature of the beast, this interface is not a full-blown XPCOM component. The primary reason is that objects that implement this interface generally must be operational before XPCOM (or any of the rest of Mozilla) are initialized. As a result, this interface is instantiated by somewhat unconventional means.
To create the implementor of this interface, you call the function NS_CreateNativeAppSupport. This is done in the startup code in nsAppRunner.cpp
The interface provides these functions: start - You call this to inform the native app support that the application is starting. In addition, it serves as a query as to whether the application should continue to run.
If the returned boolean result is PR_FALSE, then the application should exit without further processing. In such cases, the returned nsresult indicates whether the reason to exit is due to an error or not.
Win32 Note: In the case of starting a second instance of this executable, this function will return PR_FALSE and nsresult==NS_OK. This means that the command line arguments have been successfully passed to the instance of the application acting as a remote server. quit - Informs the native app support that the application is stopping. The app support should disable any functionality enabled by start.
onLastWindowClosing - Called when the last window is closed. Used as a "soft" shutdown, passwords are flushed.