NtWaitForDebugEvent - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTDBG_H

/**
 * Waits for a debug event to occur.
 *
 * \param DebugObjectHandle A handle to the debug object.
 * \param Alertable Specifies whether the wait is alertable.
 * \param Timeout Optional. A pointer to a LARGE_INTEGER structure that specifies the timeout.
 * \param WaitStateChange A pointer to a DBGUI_WAIT_STATE_CHANGE structure that receives information about the debug event.
 * \return NTSTATUS Successful or errant status.
 * \remarks Waits for debugger events, not ordinary process completion. A zero timeout on an
 * unattached empty debug object returns STATUS_TIMEOUT; the state-change output must not be interpreted as
 * a delivered event in that case. A real event requires the debugger's corresponding continue protocol.
 */
_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
NtWaitForDebugEvent(
    _In_ HANDLE DebugObjectHandle,
    _In_ BOOLEAN Alertable,
    _In_opt_ PLARGE_INTEGER Timeout,
    _Out_ PDBGUI_WAIT_STATE_CHANGE WaitStateChange
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwWaitForDebugEvent(
    _In_ HANDLE DebugObjectHandle,
    _In_ BOOLEAN Alertable,
    _In_opt_ PLARGE_INTEGER Timeout,
    _Out_ PDBGUI_WAIT_STATE_CHANGE WaitStateChange
    );

#endif

View code on GitHub

NtDoc

No description available.