Export (0) Print
Expand All

IVsSolution.AddVirtualProjectEx Method

Assigns the original GUID to the project when it is recreated the next time the solution is opened.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int AddVirtualProjectEx (
	[InAttribute] IVsHierarchy pHierarchy,
	[InAttribute] uint grfAddVPFlags,
	[InAttribute] ref Guid rguidProjectID
)
int AddVirtualProjectEx (
	/** @attribute InAttribute() */ IVsHierarchy pHierarchy, 
	/** @attribute InAttribute() */ UInt32 grfAddVPFlags, 
	/** @attribute InAttribute() */ /** @ref */ Guid rguidProjectID
)
JScript does not support passing value-type arguments by reference.

Parameters

pHierarchy

[in] Pointer to a hierarchy object.

grfAddVPFlags

[in] Determines whether to add a new virtual project to the Solution Explorer. For a list of grfAddVPFlags, see __VSADDVPFLAGS.

rguidProjectID

[in] Unique project identifier (GUID).

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsSolution::AddVirtualProjectEx(
   [in] IVsHierarchy *pHierarchy,
   [in] VSADDVPFLAGS grfAddVPFlags,
   [in] REFGUID rguidProjectID
);

This method is the same as AddVirtualProject except that the caller can specify a per-instance GUID project identifier (rGUIDProjectID) for this project to enable GetProjectOfGuid and GetProjectOfProjref to function properly. The caller is responsible for persisting this instance GUID and passing the same GUID when reloading the same project instance.

NoteNote

The GUID project identifier is not the same as the GUID project type. CoCreateGuid() is useful for creating new GUIDs.

Community Additions

ADD
Show:
© 2014 Microsoft