IDebugSymbols::SetScope method

The SetScope method sets the current scope.

Syntax


HRESULT SetScope(
  [in]           ULONG64            InstructionOffset,
  [in, optional] PDEBUG_STACK_FRAME ScopeFrame,
  [in, optional] PVOID              ScopeContext,
  [in]           ULONG              ScopeContextSize
);

Parameters

InstructionOffset [in]

Specifies the location in the process's virtual address space for the scope's current instruction. This is only used if both ScopeFrame and ScopeContext are NULL; otherwise, it is ignored.

ScopeFrame [in, optional]

Specifies the scope's stack frame. For information about this structure, see DEBUG_STACK_FRAME.

ScopeContext [in, optional]

Specifies the scope's thread context. The type of the thread context is the CONTEXT structure for the target's effective processor. The buffer ScopeContext must be large enough to hold this structure. If ScopeContext is NULL, the current register context is used instead.

ScopeContextSize [in]

Specifies the size of the buffer ScopeContext.

Return value

This method may also return error values. See Return Values for more details.

Return codeDescription
S_OK

The scope identified by InstructionOffset, ScopeFrame, and ScopeContext is the same as the old scope.

S_FALSE

The scope has changed.

 

Remarks

If only InstructionOffset is provided, the scope can be used to look up symbol names; however, the values of these symbols will not be available.

To set the scope to a previous state, ScopeContext must be provided. This is not always necessary (for example, if you only wish to access the symbols and not the registers). To set the scope to a frame on the current stack, SetScopeFrameByIndex can be used.

For more information about scopes, see Scopes and Symbol Groups.

Requirements

Target platform

Desktop

Header

Dbgeng.h (include Dbgeng.h)

See also

IDebugSymbols
IDebugSymbols2
IDebugSymbols3
GetScope
ResetScope
SetScopeFrameByIndex

 

 

Send comments about this topic to Microsoft

Show: