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)

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

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