IVsToolWindowFactory::CreateToolWindow Method (Guid, UInt32)

 

Enables the environment to create multiple on-demand tool windows that are implemented by VSPackages.

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

int CreateToolWindow(
	[InAttribute] Guid% rguidPersistenceSlot,
	unsigned int dwToolWindowId
)

Parameters

rguidPersistenceSlot
Type: System::Guid

[in] Unique identifier of the tool window.

dwToolWindowId
Type: System::UInt32

[in] Double word containing the tool window ID.

Return Value

Type: System::Int32

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

From vsshell.idl:

HRESULT IVsToolWindowFactory::CreateToolWindow(
   [in] REFGUID rguidPersistenceSlot,
   [in] DWORD dwToolWindowId
);

When a VSPackage supports multi-instance tool windows, each window uses the same rguidPersistenceSlot. The dwToolWindowId parameter is used to differentiate between the various instances of the tool window. To create the initial instance of the tool window, call CreateToolWindow from your CreateTool implementation with the dwToolWindowId parameter set to zero.

Return to top
Show: