Freigeben über


ISymUnmanagedWriter2::DefineLocalVariable2 Method

Defines a single variable in the current lexical scope. This method can be called multiple times for a variable of the same name that has multiple homes throughout a scope. In this case, however, the values of the startOffset and endOffset parameters must not overlap.

HRESULT DefineLocalVariable2(
    [in] const WCHAR  *name,
    [in] ULONG32      attributes,
    [in] mdSignature  sigToken,
    [in] ULONG32      addrKind,
    [in] ULONG32      addr1,
    [in] ULONG32      addr2,
    [in] ULONG32      addr3,
    [in] ULONG32      startOffset,
    [in] ULONG32      endOffset);

Parameters

  • name
    [in] The local variable name.
  • attributes
    [in] The local variable attributes.
  • sigToken
    [in] The metadata token of the signature.
  • addrKind
    [in] The address type.
  • addr1
    [in] The first address for the parameter specification.
  • addr2
    [in] The second address for the parameter specification.
  • addr3
    [in] The third address for the parameter specification.
  • startOffset
    [in] The start offset for the variable. This parameter is optional. If it is 0, this parameter is ignored and the variable is defined throughout the entire scope. If it is a nonzero value, the variable falls within the offsets of the current scope.
  • endOffset
    [in] The end offset for the variable. This parameter is optional. If it is 0, this parameter is ignored and the variable is defined throughout the entire scope. If it is a nonzero value, the variable falls within the offsets of the current scope.

Return Value

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

Requirements

Header: CorSym.idl

See Also

Reference

ISymUnmanagedWriter2 Interface
ISymUnmanagedWriter::DefineLocalVariable Method