IVsMonitorSelection2.GetElementID Method
Retrieves the element identifier for a VsPackage-defined Element of Selection.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function GetElementID ( _
ByRef rguidElement As Guid, _
<OutAttribute> ByRef pElementId As UInteger _
) As Integer
int GetElementID(
ref Guid rguidElement,
out uint pElementId
)
int GetElementID(
[InAttribute] Guid% rguidElement,
[OutAttribute] unsigned int% pElementId
)
abstract GetElementID :
rguidElement:Guid byref *
pElementId:uint32 byref -> int
function GetElementID(
rguidElement : Guid,
pElementId : uint
) : int
Parameters
rguidElement
Type: Guid%[in] The GUID of the element whose identifier is being retrieved.
pElementId
Type: UInt32%[out] The element identifier.
Return Value
Type: Int32
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"
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.