BP_RESOLUTION_LOCATION

Spécifie la structure de l’emplacement de résolution de point d’arrêt.

Syntaxe

public struct BP_RESOLUTION_LOCATION {
    public uint   bpType;
    public IntPtr unionmember1;
    public IntPtr unionmember2;
    public IntPtr unionmember3;
    public uint   unionmember4;
};

Membres

bpType
Valeur de l’énumération BP_TYPE qui spécifie comment interpréter l’union ou unionmemberX les bpResLocation membres.

bpResLocation.bpresCode
[C++ uniquement] Contient la structure BP_RESOLUTION_CODE si bpType = BPT_CODE.

bpResLocation.bpresData
[C++ uniquement] Contient la structure BP_RESOLUTION_DATA si bpType = BPT_DATA.

bpResLocation.unused
[C++ uniquement] Espace réservé.

unionmember1
[C# uniquement] Consultez les remarques sur la façon d’interpréter.

unionmember2
[C# uniquement] Consultez les remarques sur la façon d’interpréter.

unionmember3
[C# uniquement] Consultez les remarques sur la façon d’interpréter.

unionmember4
[C# uniquement] Consultez les remarques sur la façon d’interpréter.

Notes

Cette structure est membre des structures BP_ERROR_RESOLUTION_INFO et BP_RESOLUTION_INFO .

[C# uniquement] Les unionmemberX membres sont interprétés selon le tableau suivant. Examinez la colonne gauche de la bpType valeur, puis déterminez ce que chaque unionmemberX membre représente et marshale en unionmemberX conséquence. Consultez l’exemple pour obtenir un moyen d’interpréter cette structure en C#.

bpLocationType unionmember1 unionmember2 unionmember3 unionmember4
BPT_CODE IDebugCodeContext2 - - -
BPT_DATA string (expression de données) string (nom de la fonction) string (nom de l’image) enum_BP_RES_DATA_FLAGS

Exemple

Cet exemple montre comment interpréter la BP_RESOLUTION_LOCATION structure en C#.

using System;
using System.Runtime.Interop.Services;
using Microsoft.VisualStudio.Debugger.Interop;

namespace MyPackage
{
    public class MyClass
    {
        public void Interpret(BP_RESOLUTION_LOCATION bprl)
        {
            if (bprl.bpType == (uint)enum_BP_TYPE.BPT_CODE)
            {
                IDebugCodeContext2 pContext = (IDebugCodeContext2)Marshal.GetObjectForIUnknown(bp.unionmember1);
            }
            else if (bprl.bpType == (uint)enum_BP_TYPE.BPT_DATA)
            {
                string dataExpression = Marshal.PtrToStringBSTR(bp.unionmember3);
                string functionName = Marshal.PtrToStringBSTR(bp.unionmember2);
                string imageName = Marshal.PtrToStringBSTR(bp.unionmember3);
                enum_BP_RES_DATA_FLAGS numElements = (enum_BP_RES_DATA_FLAGS)bp.unionmember4;
            }
        }
    }
}

Spécifications

En-tête : msdbg.h

Espace de noms : Microsoft.VisualStudio.Debugger.Interop

Assembly : Microsoft.VisualStudio.Debugger.Interop.dll

Voir aussi