다음을 통해 공유


ISymUnmanagedWriter::CloseScope Method

Closes the current lexical scope.

HRESULT CloseScope(
        [in] ULONG32 endOffset);

Parameters

  • endOffset
    [in] The offset from the beginning of the method of the point at the end of the last instruction in the lexical scope, in bytes.

Return Value

S_OK if the method succeeds; otherwise, E_FAIL or some other error code.

Remarks

Once a scope is closed, no more variables can be defined within it.

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

Requirements

Header: CorSym.idl

See Also

Concepts

ISymUnmanagedWriter Interface