IVsAddProjectItemDlg2::AddExistingProjectItems Method (UInt32, Guid, IVsProject^, UInt32, Guid, String^, Guid, UInt32, array<String^>^)

 

Adds existing project items.

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

int AddExistingProjectItems(
	unsigned int itemidLoc,
	[InAttribute] Guid% rguidProject,
	IVsProject^ pProject,
	unsigned int grfEditorFlags,
	[InAttribute] Guid% rguidEditorType,
	String^ pszPhysicalView,
	[InAttribute] Guid% rguidLogicalView,
	unsigned int cFilesToAdd,
	array<String^>^ rgpszFilesToAdd
)

Parameters

itemidLoc
Type: System::UInt32

[in] Item identifier of the folder in the project to which items should be added.

rguidProject
Type: System::Guid

[in] Unique identifier of the project.

pProject
Type: Microsoft.VisualStudio.Shell.Interop::IVsProject^

[in] Pointer to the IVsProject interface on which Add Item will be called.

grfEditorFlags
Type: System::UInt32

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

rguidEditorType
Type: System::Guid

[in] Editor type with which to open (if supported).

pszPhysicalView
Type: System::String^

[in] Physical view with which to open (if supported).

rguidLogicalView
Type: System::Guid

[in] Logical view with which to open (if supported).

cFilesToAdd
Type: System::UInt32

[in] Number of files to add.

rgpszFilesToAdd
Type: array<System::String^>^

[in, size_is(cFilesToAdd)] Array of files whose actual number is cFilesToAdd.

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 IVsAddProjectItemDlg2::AddExistingProjectItems(
   [in] VSITEMID itemidLoc,
   [in] REFGUID rguidProject,
   [in] IVsProject *pProject,
   [in] VSSPECIFICEDITORFLAGS grfEditorFlags,
   [in] REFGUID rguidEditorType,
   [in] LPCOLESTR pszPhysicalView,
   [in] REFGUID rguidLogicalView,
   [in] ULONG cFilesToAdd,
   [in, size_is(cFilesToAdd)] LPCOLESTR rgpszFilesToAdd[]
);
Return to top
Show: