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.

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.

Requirements

Header: CorSym.idl

Remarks

ISymUnmanagedWriter::OpenScope Method returns an opaque scope identifier that can be used with ISymUnmanagedWriter::SetScopeRange Method to define a scope's starting and ending offset at a later time. In this case, the offsets passed to ISymUnmanagedWriter::OpenScope Methodand ISymUnmanagedWriter::CloseScope Method are ignored. Scope identifiers are only valid in the current method.

See Also

Reference

ISymUnmanagedWriter Interface