Compartilhar via


IVsMonitorSelection2.GetElementID(Guid, UInt32) Method

Definition

Retrieves the element identifier for a VsPackage-defined Element of Selection.

public:
 int GetElementID(Guid % rguidElement, [Runtime::InteropServices::Out] System::UInt32 % pElementId);
public int GetElementID (ref Guid rguidElement, out uint pElementId);
abstract member GetElementID : Guid * uint32 -> int
Public Function GetElementID (ByRef rguidElement As Guid, ByRef pElementId As UInteger) As Integer

Parameters

rguidElement
Guid

[in] The GUID of the element whose identifier is being retrieved.

pElementId
UInt32

[out] The element identifier.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method returns an element identifier equivalent to SEID_WindowFrame or SEID_ResultList. In order to define a new selection element, a GUID needs to be registered under HKLM\Software\Microsoft\VisualStudio\\SelectionElements\ as a subkey. For example:

HKLM\Software\Microsoft\VisualStudio\8.0\SelectionElements\

{...guid1...}\@ = "Team System Active Portfolio Project"

{...guid2...}\@ = "Team System Active Team Foundation Server"

Applies to