다음을 통해 공유


IVsPackage.CreateTool Method

Enables the environment to create 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)

Syntax

‘선언
Function CreateTool ( _
    ByRef rguidPersistenceSlot As Guid _
) As Integer
‘사용 방법
Dim instance As IVsPackage
Dim rguidPersistenceSlot As Guid
Dim returnValue As Integer

returnValue = instance.CreateTool(rguidPersistenceSlot)
int CreateTool(
    ref Guid rguidPersistenceSlot
)
int CreateTool(
    [InAttribute] Guid% rguidPersistenceSlot
)
function CreateTool(
    rguidPersistenceSlot : Guid
) : int

Parameters

  • rguidPersistenceSlot
    Type: System.Guid%

    [in] Unique identifier of the Tool window.

Return Value

Type: System.Int32

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsPackage::CreateTool(
   [in] REFGUID rguidPersistenceSlot
);

A tool window can be configured to open automatically the next time the environment is launched if the window was open during the environment shutdown.

Note

This method should not make the Tool window visible; that is, it should not call Show

To automatically open Tool windows when the environment is launched, pass CTW_fForceCreate to CreateToolWindow. The tool windows and their configuration must be registered in the system registry. For specific registry entry format and values, see Tool Window Registration and Configuration.

Permissions

See Also

Reference

IVsPackage Interface

IVsPackage Members

Microsoft.VisualStudio.Shell.Interop Namespace