UnregisterApplicationRestart function (winbase.h)

Removes the active instance of an application from the restart list.


HRESULT UnregisterApplicationRestart();

Return value

This function returns S_OK on success or one of the following error codes.

Return code Description
Internal error.


You do not need to call this function before exiting. You need to remove the registration only if you choose to not restart the application. For example, you could remove the registration if your application entered a corrupted state where a future restart would also fail. You must call this function before the application fails abnormally.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also