NtSystemDebugControl - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

/**
 * The NtSystemDebugControl routine provides system debugging and diagnostic control of the system.
 *
 * \param[in] Command The debug control command to execute (of type SYSDBG_COMMAND).
 * \param[in] InputBuffer Optional pointer to a buffer containing input data for the command.
 * \param[in] InputBufferLength Length, in bytes, of the input buffer.
 * \param[out] OutputBuffer Optional pointer to a buffer that receives output data from the command.
 * \param[in] OutputBufferLength Length, in bytes, of the output buffer.
 * \param[out] ReturnLength Optional pointer to a variable that receives the number of bytes returned in the output buffer.
 * \return NTSTATUS Successful or errant status.
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSystemDebugControl(
    _In_ SYSDBG_COMMAND Command,
    _Inout_updates_bytes_opt_(InputBufferLength) PVOID InputBuffer,
    _In_ ULONG InputBufferLength,
    _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer,
    _In_ ULONG OutputBufferLength,
    _Out_opt_ PULONG ReturnLength
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSystemDebugControl(
    _In_ SYSDBG_COMMAND Command,
    _Inout_updates_bytes_opt_(InputBufferLength) PVOID InputBuffer,
    _In_ ULONG InputBufferLength,
    _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer,
    _In_ ULONG OutputBufferLength,
    _Out_opt_ PULONG ReturnLength
    );

#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

Function NtSystemDebugControl is used by some low-level debuggers written by Microsoft and available typically in DDK.

Command

Command request for system. Command's codes are available in enumeration type SYSDBG_COMMAND.

InputBuffer

User's allocated buffer with input data.

InputBufferLength

Length of InputBuffer, in bytes.

OutputBuffer

User's allocated buffer for output data.

OutputBufferLength

Length of OutputBuffer, in bytes.

ReturnLength

Pointer to ULONG value receiving required size of OutputBuffer.

Documented by

See also