Partager via


IVsUIShell.FindToolWindowEx Method

Returns the IVsWindowFrame pointer for the requested single- or multi-instance tool window.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function FindToolWindowEx ( _
    grfFTW As UInteger, _
    ByRef rguidPersistenceSlot As Guid, _
    dwToolWinId As UInteger, _
    <OutAttribute> ByRef ppWindowFrame As IVsWindowFrame _
) As Integer
int FindToolWindowEx(
    uint grfFTW,
    ref Guid rguidPersistenceSlot,
    uint dwToolWinId,
    out IVsWindowFrame ppWindowFrame
)
int FindToolWindowEx(
    [InAttribute] unsigned int grfFTW, 
    [InAttribute] Guid% rguidPersistenceSlot, 
    [InAttribute] unsigned int dwToolWinId, 
    [OutAttribute] IVsWindowFrame^% ppWindowFrame
)
abstract FindToolWindowEx : 
        grfFTW:uint32 * 
        rguidPersistenceSlot:Guid byref * 
        dwToolWinId:uint32 * 
        ppWindowFrame:IVsWindowFrame byref -> int
function FindToolWindowEx(
    grfFTW : uint, 
    rguidPersistenceSlot : Guid, 
    dwToolWinId : uint, 
    ppWindowFrame : IVsWindowFrame
) : int

Parameters

  • grfFTW
    Type: UInt32

    [in] Provides criteria used to find a tool window in the environment. For more information, see __VSFINDTOOLWIN.

  • rguidPersistenceSlot
    Type: Guid%

    [in] Unique identifier for a tool window created using CreateToolWindow. The caller of this method can use predefined identifiers that map to tool windows if those tool windows are known to the caller.

  • dwToolWinId
    Type: UInt32

    [in] Identifier of the requested tool window in the multi-instanced tool window. The first instance of a multi-instance tool window has an identifier of zero, the second instance has an identifier of one, and so on.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShell::FindToolWindowEx(
   [in] VSFINDTOOLWIN grfFTW,
   [in] REFGUID rguidPersistenceSlot,
   [in] DWORD dwToolWinId,
   [out] IVsWindowFrame **ppWindowFrame
);

This method requires that a fully-created tool window exist. Because of the delayed creation of tool windows, a valid window frame may exist, but the window might not have been created yet. If the window frame is not filled with an object then the environment fails and the parent routine is responsible for finishing creating the window. However, if you specify a value of FTW_fForceCreate for the grfFTW parameter, then the environment attempts to create the tool window for you. If you specify a value of FTW_fFrameOnly, then the environment returns a pointer to window frame, even if the window frame is not populated with an object. Use the FTW_fFrameOnly value to set a property on the window frame for a tool window, in which case a fully-created tool window is not required.

.NET Framework Security

See Also

Reference

IVsUIShell Interface

Microsoft.VisualStudio.Shell.Interop Namespace