Joins a secondary installer to an existing Restart Manager session. This function must be called with a session key that can only be obtained from the primary installer that started the session. A valid session key is required to use any of the Restart Manager functions. After a secondary installer joins a session, it can call the RmRegisterResources function to register resources.
DWORD RmJoinSession( DWORD *pSessionHandle, const WCHAR  strSessionKey );
A pointer to the handle of an existing Restart Manager Session.
A null-terminated string that contains the session key of an existing session.
This is the most recent error received. The function can return one of the system error codes that are defined in Winerror.h.
||The function completed successfully.|
||The session key cannot be validated.|
||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.|
||The maximum number of sessions has been reached.|
||A Restart Manager operation could not complete because not enough memory was available.|
The RmJoinSession function joins a secondary installer to an existing Restart Manager session. This is typically an installer that does not control the user interface and can run either in-process or out-of-process of the primary installer. Only the primary installer can call the RmStartSession function and this is typically the application that controls the user interface or that controls the installation sequence of multiple patches in an update.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|