共用方式為


DEBUG_ADDRESS

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

This structure represents an address.

Syntax

typedef struct _tagDEBUG_ADDRESS {
    ULONG32             ulAppDomainID;
    GUID                guidModule;
    _mdToken            tokClass;
    DEBUG_ADDRESS_UNION addr;
} DEBUG_ADDRESS;
public struct DEBUG_ADDRESS {
    public uint                ulAppDomainID;
    public Guid                guidModule;
    public int                 tokClass;
    public DEBUG_ADDRESS_UNION addr;
}

Members

ulAppDomainID
The process ID.

guidModule
The GUID of the module that contains this address.

tokClass
The token identifying the class or type of this address.

Note

This value is specific to a symbol provider and therefore has no general meaning other than as an identifier for a class type.

addr
A DEBUG_ADDRESS_UNION structure, which contains a union of structures that describe the individual address types. The value addr.dwKind comes from the ADDRESS_KIND enumeration, which explains how to interpret the union.

Remarks

This structure is passed to the GetAddress method to be filled in.

Warning [C++ only]

If addr.dwKind is ADDRESS_KIND_METADATA_LOCAL and if addr.addr.addrLocal.pLocal is not a null value, then you must call Release on the token pointer:

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