RmGetList function (restartmanager.h)
Gets a list of all applications and services that are currently using resources that have been registered with the Restart Manager session.
Syntax
DWORD RmGetList(
[in] DWORD dwSessionHandle,
[out] UINT *pnProcInfoNeeded,
[in, out] UINT *pnProcInfo,
[in, out, optional] RM_PROCESS_INFO [] rgAffectedApps,
[out] LPDWORD lpdwRebootReasons
);
Parameters
[in] dwSessionHandle
A handle to an existing Restart Manager session.
[out] pnProcInfoNeeded
A pointer to an array size necessary to receive RM_PROCESS_INFO structures required to return information for all affected applications and services.
[in, out] pnProcInfo
A pointer to the total number of RM_PROCESS_INFO structures in an array and number of structures filled.
[in, out, optional] rgAffectedApps
An array of RM_PROCESS_INFO structures that list the applications and services using resources that have been registered with the session.
[out] lpdwRebootReasons
Pointer to location that receives a value of the RM_REBOOT_REASON enumeration that describes the reason a system restart is needed.
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. |
|
This error value is returned by the RmGetList function if the rgAffectedApps buffer is too small to hold all application information in the list. |
|
The current operation is canceled by user. |
|
A Restart Manager function could not obtain a Registry write mutex in the allotted time. A system restart is recommended because further use of the Restart Manager is likely to fail. |
|
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 a parameter that requires a non-null and non-zero value. |
|
An operation was unable to read or write to the registry. |
|
A Restart Manager operation could not complete because not enough memory was available. |
|
No Restart Manager session exists for the handle supplied. |
|
A path registered to the Restart Manager session is a directory. |
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 |