RmAddFilter function (restartmanager.h)
Modifies the shutdown or restart actions that are applied to an application or service. The primary installer can call the RmAddFilter function multiple times. The most recent call overrides any previous modifications to the same file, process, or service.
Syntax
DWORD RmAddFilter(
[in] DWORD dwSessionHandle,
[in, optional] LPCWSTR strModuleName,
[in, optional] RM_UNIQUE_PROCESS *pProcess,
[in, optional] LPCWSTR strServiceShortName,
[in] RM_FILTER_ACTION FilterAction
);
Parameters
[in] dwSessionHandle
A handle to an existing Restart Manager session.
[in, optional] strModuleName
A pointer to a null-terminated string value that contains the full path to the application's executable file. Modifications to shutdown or restart actions are applied for the application that is referenced by the full path. This parameter must be NULL if the Application or strServiceShortName parameter is non-NULL.
[in, optional] pProcess
A pointer to a RM_UNIQUE_PROCESS structure for the application. Modifications to shutdown or restart actions are applied for the application that is referenced by the RM_UNIQUE_PROCESS structure. This parameter must be NULL if the strFilename or strShortServiceName parameter is non-NULL.
[in, optional] strServiceShortName
A pointer to a null-terminated string value that contains the short service name. Modifications to shutdown or restart actions are applied for the service that is referenced by short service filename. This parameter must be NULL if the strFilename or Application parameter is non-NULL.
[in] FilterAction
An RM_FILTER_ACTION enumeration value that specifies the type of modification to be applied.
Return value
This is the most recent error received. The function can return one of the system error codes that are defined in Winerror.h.
Value | Meaning |
---|---|
|
The function completed successfully. |
|
One or more arguments are not correct. This error value is returned by the Restart Manager function if a NULL pointer or 0 is passed in as a parameter that requires a non-null and non-zero value. |
|
This error is returned when a secondary installer calls this function. This function is only available to primary installers. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | restartmanager.h |
Library | Rstrtmgr.lib |
DLL | Rstrtmgr.dll |