Kernel32RegisterApplicationRestart Method
Registers the active instance of an application for restart.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
public static HResult RegisterApplicationRestart(
string commandline,
ApplicationRestartFlags flags
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Unicode, ExactSpelling := true>]
Public Shared Function RegisterApplicationRestart (
commandline As String,
flags As ApplicationRestartFlags
) As HResult
Dim commandline As String
Dim flags As ApplicationRestartFlags
Dim returnValue As HResult
returnValue = Kernel32.RegisterApplicationRestart(commandline,
flags)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Unicode, ExactSpelling = true)]
static HResult RegisterApplicationRestart(
String^ commandline,
ApplicationRestartFlags flags
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)>]
static member RegisterApplicationRestart :
commandline : string *
flags : ApplicationRestartFlags -> HResult
No code example is currently available or this language may not be supported.
- commandline String
-
A pointer to a Unicode string that specifies the command-line arguments for the application when it is restarted.
The maximum size of the command line that you can specify is RESTART_MAX_CMD_LINE characters.
Do not include the name of the executable in the command line; this function adds it for you.
If this parameter is NULL or an empty string, the previously registered command line is removed.
If the argument contains spaces, use quotes around the argument.
- flags ApplicationRestartFlags
-
Application restart flags.
HResult
This function returns
S_OK on success, or an
HResult error codes on fail.