共用方式為


IVsProject4.AddItemWithSpecific Method

Definition

Adds an item using a specific editor.

public:
 int AddItemWithSpecific(System::UInt32 itemidLoc, Microsoft::VisualStudio::Shell::Interop::VSADDITEMOPERATION dwAddItemOperation, System::String ^ pszItemName, System::UInt32 cFilesToOpen, cli::array <System::String ^> ^ rgpszFilesToOpen, IntPtr hwndDlgOwner, System::UInt32 grfEditorFlags, Guid % rguidEditorType, System::String ^ pszPhysicalView, Guid % rguidLogicalView, cli::array <Microsoft::VisualStudio::Shell::Interop::VSADDRESULT> ^ pResult);
public int AddItemWithSpecific (uint itemidLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION dwAddItemOperation, string pszItemName, uint cFilesToOpen, string[] rgpszFilesToOpen, IntPtr hwndDlgOwner, uint grfEditorFlags, ref Guid rguidEditorType, string pszPhysicalView, ref Guid rguidLogicalView, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] pResult);
abstract member AddItemWithSpecific : uint32 * Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION * string * uint32 * string[] * nativeint * uint32 * Guid * string * Guid * Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] -> int
Public Function AddItemWithSpecific (itemidLoc As UInteger, dwAddItemOperation As VSADDITEMOPERATION, pszItemName As String, cFilesToOpen As UInteger, rgpszFilesToOpen As String(), hwndDlgOwner As IntPtr, grfEditorFlags As UInteger, ByRef rguidEditorType As Guid, pszPhysicalView As String, ByRef rguidLogicalView As Guid, pResult As VSADDRESULT()) As Integer

Parameters

itemidLoc
UInt32

[in] Item identifier of the item to add. Values are taken from the VSITEMIDDWORD.

dwAddItemOperation
VSADDITEMOPERATION

[in] Values taken from the VSADDITEMOPERATION enumeration.

pszItemName
String

[in] Name of the item to be added.

cFilesToOpen
UInt32

[in] Number of files to open.

rgpszFilesToOpen
String[]

[in, size_is(cFilesToOpen)] Actual number of files passed in with cFilesToOpen.

hwndDlgOwner
IntPtr

nativeint

[in] Handle to the dialog box.

grfEditorFlags
UInt32

[in] Flags whose values are taken from the __VSSPECIFICEDITORFLAGS enumeration.

rguidEditorType
Guid

[in] Unique identifier of the editor type.

pszPhysicalView
String

[in] Name of physical view.

rguidLogicalView
Guid

[in] Name of the logical view.

pResult
VSADDRESULT[]

[out, retval] Results whose values are taken from the VSADDRESULT enumeration.

Returns

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

Implements

Applies to