Partager via


METADATA_ADDRESS_LOCAL

This structure represents the address of a local variable within a scope (usually a function or method).

typedef struct _tagMETADATA_ADDRESS_LOCAL {
   _mdToken  tokMethod;
   IUnknown* pLocal;
   DWORD     dwIndex;
} METADATA_ADDRESS_LOCAL;
public struct METADATA_ADDRESS_LOCAL {
   public int    tokMethod;
   public object pLocal;
   public uint   dwIndex;
}

Terms

  • tokMethod
    The ID of the method or function the local variable is part of.

    [C++] _mdToken is a typedef for a 32-bit int.

  • pLocal
    The token whose address this structure represents.

  • dwIndex
    Can be the index of this local variable in the method or function, or some other value (language-specific).

Remarks

This structure is part of the union in the DEBUG_ADDRESS_UNION structure when the dwKind field of the DEBUG_ADDRESS_UNION structure is set to ADDRESS_KIND_LOCAL (a value from the ADDRESS_KIND enumeration).

Warning: [C++ only]  If pLocal is not null, then you must call Release on the token pointer (addr is a field in the DEBUG_ADDRESS structure):

if (addr.dwKind == ADDRESS_KIND_METADATA_LOCAL &&  addr.addr.addrLocal.pLocal != NULL)
{
    addr.addr.addrLocal.pLocal->Release();
}

Requirements

Header: sh.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See Also

Reference

Structures and Unions

DEBUG_ADDRESS_UNION

DEBUG_ADDRESS

ADDRESS_KIND