IVsMonitorSelection2::GetElementID Method (Guid, UInt32)

 

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)

int GetElementID(
	[InAttribute] Guid% rguidElement,
	[OutAttribute] unsigned int% pElementId
)

Parameters

rguidElement
Type: System::Guid

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

pElementId
Type: System::UInt32

[out] The element identifier.

Return Value

Type: System::Int32

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

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"

Return to top
Show: