Compartir a través de


IVsProject3.OpenItemWithSpecific Method

Opens an item using a specific editor.

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

Syntax

'Declaración
Function OpenItemWithSpecific ( _
    itemid As UInteger, _
    grfEditorFlags As UInteger, _
    ByRef rguidEditorType As Guid, _
    pszPhysicalView As String, _
    ByRef rguidLogicalView As Guid, _
    punkDocDataExisting As IntPtr, _
    <OutAttribute> ByRef ppWindowFrame As IVsWindowFrame _
) As Integer
'Uso
Dim instance As IVsProject3
Dim itemid As UInteger
Dim grfEditorFlags As UInteger
Dim rguidEditorType As Guid
Dim pszPhysicalView As String
Dim rguidLogicalView As Guid
Dim punkDocDataExisting As IntPtr
Dim ppWindowFrame As IVsWindowFrame
Dim returnValue As Integer

returnValue = instance.OpenItemWithSpecific(itemid, _
    grfEditorFlags, rguidEditorType, _
    pszPhysicalView, rguidLogicalView, _
    punkDocDataExisting, ppWindowFrame)
int OpenItemWithSpecific(
    uint itemid,
    uint grfEditorFlags,
    ref Guid rguidEditorType,
    string pszPhysicalView,
    ref Guid rguidLogicalView,
    IntPtr punkDocDataExisting,
    out IVsWindowFrame ppWindowFrame
)
int OpenItemWithSpecific(
    [InAttribute] unsigned int itemid, 
    [InAttribute] unsigned int grfEditorFlags, 
    [InAttribute] Guid% rguidEditorType, 
    [InAttribute] String^ pszPhysicalView, 
    [InAttribute] Guid% rguidLogicalView, 
    [InAttribute] IntPtr punkDocDataExisting, 
    [OutAttribute] IVsWindowFrame^% ppWindowFrame
)
abstract OpenItemWithSpecific : 
        itemid:uint32 * 
        grfEditorFlags:uint32 * 
        rguidEditorType:Guid byref * 
        pszPhysicalView:string * 
        rguidLogicalView:Guid byref * 
        punkDocDataExisting:IntPtr * 
        ppWindowFrame:IVsWindowFrame byref -> int 
function OpenItemWithSpecific(
    itemid : uint, 
    grfEditorFlags : uint, 
    rguidEditorType : Guid, 
    pszPhysicalView : String, 
    rguidLogicalView : Guid, 
    punkDocDataExisting : IntPtr, 
    ppWindowFrame : IVsWindowFrame
) : int

Parameters

  • itemid
    Type: System.UInt32
    [in] Item identifier of the item to open. Values are taken from the VSITEMID DWORD.
  • rguidEditorType
    Type: System.Guid%
    [in] Unique identifier of the editor type.
  • pszPhysicalView
    Type: System.String
    [in] Name of the physical view.
  • rguidLogicalView
    Type: System.Guid%
    [in] Name of the logical view.
  • punkDocDataExisting
    Type: System.IntPtr
    [in] Pointer to the IUnknown interface on the document to open.

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 IVsProject3::OpenItemWithSpecific(
   [in] VSITEMID itemid,
   [in] VSSPECIFICEDITORFLAGS grfEditorFlags,
   [in] REFGUID rguidEditorType,
   [in] LPCOLESTR pszPhysicalView,
   [in] REFGUID rguidLogicalView,
   [in] IUnknown *punkDocDataExisting,
   [out] IVsWindowFrame **ppWindowFrame
);

This method is used to ask the project to open the item (document) using the specified editor information. It is an extension of OpenItem.

It is implemented in conjunction with OpenSpecificEditor.

.NET Framework Security

See Also

Reference

IVsProject3 Interface

IVsProject3 Members

Microsoft.VisualStudio.Shell.Interop Namespace