3.7.4.4 AppGetStatus (Opnum 6)
The AppGetStatus method retrieves the status of the application defined at the specified metabase path.
-
HRESULT AppGetStatus( [in, unique, string] LPCWSTR szMDPath, [out] DWORD* pdwAppStatus );
szMDPath: A pointer to a Unicode string that contains the metabase path of the application.
pdwAppStatus: A pointer to a 32-bit unsigned integer that receives the value indicating the status of the application. This field MUST be set to one of the following values.
-
Value
Meaning
APPSTATUS_STOPPED
0x00000000
The application is defined but is not currently running.
APPSTATUS_RUNNING
0x00000001
The application is defined and is currently running.
APPSTATUS_NOTDEFINED
0x00000002
No application is defined at the specified metabase path.
Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, it failed. If the 12-bit facility code (bits 16–27) is set to 0x007, the value contains a Win32 error code in the lower 16 bits. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [MS-ERREF].
-
Return value/code
Description
0x00000000
S_OK
The call was successful.
0x80070003
ERROR_PATH_NOT_FOUND
The system cannot find the path specified.
The opnum field value for this method is 6.
When processing this call, the server MUST do the following:
Check that the path specified in the szMDPath parameter exists in the metabase. If it does not, return ERROR_PATH_NOT_FOUND.
Check if an application is defined at the path. If it is not, set the pdwAppStatus parameter to APPSTATUS_NOTDEFINED. Return S_OK.
Attempt to determine if the application is running. If unable to determine the status of the application, APPSTATUS_STOPPED MUST be returned. If application is running, APPSTATUS_RUNNING MUST be returned, otherwise APPSTATUS_STOPPED MUST be returned.<27>