ISymUnmanagedWriter::SetScopeRange Method
Defines the offset range for the specified lexical scope. The scope becomes the new current scope and is pushed onto a stack of scopes. Scopes must form a hierarchy. Siblings are not allowed to overlap.
Syntax
HRESULT OpenScope(
[in] ULONG32 scopeID,
[in] ULONG32 startOffset,
[in] ULONG32 endOffset);
Parameters
scopeId
[in] The scope identifier for the scope.
startOffset
[in] The offset, in bytes, of the first instruction in the lexical scope from the beginning of the method.
endOffset
[in] The offset, in bytes, of the last instruction in the lexical scope from the beginning of the method.
Return Value
S_OK if the method succeeds; otherwise, E_FAIL or some other error code.
Remarks
ISymUnmanagedWriter::OpenScope returns an opaque scope identifier that can be used with ISymUnmanagedWriter::SetScopeRange
to define a scope's starting and ending offset at a later time. In this case, the offsets passed to ISymUnmanagedWriter::OpenScope
and ISymUnmanagedWriter::CloseScope are ignored. Scope identifiers are only valid in the current method.
Requirements
Header: CorSym.idl, CorSym.h