IDebugPortSupplier2IDebugPortSupplier2
Cette interface fournit des ports au gestionnaire de débogage de session (SDM).This interface supplies ports to the session debug manager (SDM).
SyntaxeSyntax
IDebugPortSupplier2 : IUnknown
Notes pour les implémenteursNotes for Implementers
Un fournisseur de port personnalisé implémente cette interface pour représenter un fournisseur de ports.A custom port supplier implements this interface to represent a port supplier.
Notes pour les appelantsNotes for Callers
Un appel à CoCreateInstance
avec le fournisseur de port GUID
retourne cette interface (il s’agit de la méthode habituelle pour obtenir cette interface).A call to CoCreateInstance
with a port supplier's GUID
returns this interface (this is the typical way to obtain this interface). Par exemple :For example:
IDebugPortSupplier2 *GetPortSupplier(GUID *pPortSupplierGuid)
{
IDebugPortSupplier2 *pPS = NULL;
if (pPortSupplierGuid != NULL) {
CComPtr<IDebugPortSupplier2> spPortSupplier;
spPortSupplier.CoCreateInstance(*pPortSupplierGuid);
if (spPortSupplier != NULL) {
pPS = spPortSupplier.Detach();
}
}
return (pPS);
}
Un appel à GetPortSupplier retourne cette interface, représentant le fournisseur de port actuel utilisé par Visual StudioVisual Studio .A call to GetPortSupplier returns this interface, representing the current port supplier being used by Visual StudioVisual Studio.
GetPortSupplier retourne cette interface, qui représente le fournisseur de port qui a créé le port.GetPortSupplier returns this interface, representing the port supplier that created the port.
IEnumDebugPortSuppliers2 représente une liste d'
IDebugPortSupplier
interfaces (l'IEnumDebugPortSuppliers
interface est obtenue à partir de EnumPortSuppliers, représentant tous les fournisseurs de port inscrits auprès de Visual StudioVisual Studio ).IEnumDebugPortSuppliers2 represents a list ofIDebugPortSupplier
interfaces (theIEnumDebugPortSuppliers
interface is obtained from EnumPortSuppliers, representing all of the port suppliers registered with Visual StudioVisual Studio).
En général, un moteur de débogage n’interagit pas avec un fournisseur de ports.A debug engine typically does not interact with a port supplier.
Méthodes dans l'ordre VtableMethods in Vtable Order
Le tableau suivant présente les méthodes de IDebugPortSupplier2
.The following table shows the methods of IDebugPortSupplier2
.
MéthodeMethod | DescriptionDescription |
---|---|
GetPortSupplierNameGetPortSupplierName | Obtient le nom du fournisseur de port.Gets the port supplier name. |
GetPortSupplierIdGetPortSupplierId | Obtient l’identificateur du fournisseur de port.Gets the port supplier identifier. |
GetPortGetPort | Obtient un port à partir d’un fournisseur de ports.Gets a port from a port supplier. |
EnumPortsEnumPorts | Énumère les ports qui existent déjà.Enumerates the ports that already exist. |
CanAddPortCanAddPort | Vérifie qu’un fournisseur de ports prend en charge l’ajout de nouveaux ports.Verifies that a port supplier supports adding new ports. |
AddPortAddPort | Ajoute un port.Adds a port. |
RemovePortRemovePort | Supprime un port.Removes a port. |
NotesRemarks
Un fournisseur de ports peut s’identifier à l’aide d’un nom et d’un ID, ajouter et supprimer des ports et énumérer tous les ports fournis par le fournisseur de port.A port supplier can identify itself by name and ID, add and remove ports, and enumerate all ports that the port supplier provides.
SpécificationsRequirements
En-tête : msdbg. hHeader: msdbg.h
Espace de noms : Microsoft. VisualStudio. Debugger. InteropNamespace: Microsoft.VisualStudio.Debugger.Interop
Assembly : Microsoft.VisualStudio.Debugger.Interop.dllAssembly: Microsoft.VisualStudio.Debugger.Interop.dll