Kernel32GetApplicationRestartSettings Method
Retrieves the restart information registered for the specified process.
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 GetApplicationRestartSettings(
IntPtr hProcess,
StringBuilder commandline,
ref uint refCommandlineSize,
out ApplicationRestartFlags refFlags
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Unicode, ExactSpelling := true>]
Public Shared Function GetApplicationRestartSettings (
hProcess As IntPtr,
commandline As StringBuilder,
ByRef refCommandlineSize As UInteger,
<OutAttribute> ByRef refFlags As ApplicationRestartFlags
) As HResult
Dim hProcess As IntPtr
Dim commandline As StringBuilder
Dim refCommandlineSize As UInteger
Dim refFlags As ApplicationRestartFlags
Dim returnValue As HResult
returnValue = Kernel32.GetApplicationRestartSettings(hProcess,
commandline, refCommandlineSize,
refFlags)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Unicode, ExactSpelling = true)]
static HResult GetApplicationRestartSettings(
IntPtr hProcess,
StringBuilder^ commandline,
unsigned int% refCommandlineSize,
[OutAttribute] ApplicationRestartFlags% refFlags
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)>]
static member GetApplicationRestartSettings :
hProcess : IntPtr *
commandline : StringBuilder *
refCommandlineSize : uint32 byref *
refFlags : ApplicationRestartFlags byref -> HResult
No code example is currently available or this language may not be supported.
- hProcess IntPtr
-
A handle to the process.
This handle must have the VirtualMemoryRead access right.
- commandline StringBuilder
-
A pointer to a buffer that receives the restart command line specified by the application when it called the
RegisterApplicationRestart(String, ApplicationRestartFlags) function.
The maximum size of the command line, in characters, is RESTART_MAX_CMD_LINE.
Can be NULL if refCommandlineSize is zero.
- refCommandlineSize UInt32
-
On input, specifies the size of the commandline buffer, in characters.
If the buffer is not large enough to receive the command line,
the function fails with HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
and sets this parameter to the required buffer size, in characters.
On output, specifies the size of the buffer that was used.
To determine the required buffer size, set commandline to NULL and this parameter to zero.
The size includes one for the null-terminator character.
Note that the function returns S_OK,
not HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) in this case.
- refFlags ApplicationRestartFlags
-
A pointer to a variable that receives the flags specified by the application when it called the RegisterApplicationRestart function.
HResult
This function returns
S_OK on success, or an
HResult error code.