PWINDBG_SET_THREAD_CONTEXT_ROUTINE function

The PWINDBG_SET_THREAD_CONTEXT_ROUTINE (SetContext) function is similar to the Win32 SetThreadContext routine. It sets the context of the process being debugged.

Syntax

ULONG  SetContext(
  _In_  ULONG    Target,
  _Out_ PCONTEXT lpContext,
  _In_  ULONG    cbSizeOfContext
);

Parameters

  • Target [in]
    User mode: Specifies the thread ID of the thread being debugged.

    Kernel Mode: Specifies the processor number of the processor being debugged.

  • lpContext [out]
    Points to the address of a context structure that contains the context to be set for the process being debugged. The context structure is highly machine-specific.

  • cbSizeOfContext [in]
    Specifies the size of the context structure.

Return value

If the routine succeeds, the return value is TRUE; otherwise, it is FALSE.

Requirements

Target platform

Desktop

Header

Wdbgexts.h (include Wdbgexts.h or Dbgeng.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

 

 

Send comments about this topic to Microsoft