IVsProjectFactory.CreateProject Yöntem (String, String, String, UInt32, Guid, IntPtr, Int32)
Yeni bir proje oluşturur.
Ad Alanı: Microsoft.VisualStudio.Shell.Interop
Derleme: Microsoft.VisualStudio.Shell.Interop (Microsoft.VisualStudio.Shell.Interop.dll içinde)
Sözdizimi
int CreateProject(
string pszFilename,
string pszLocation,
string pszName,
uint grfCreateFlags,
[InAttribute] ref Guid iidProject,
out IntPtr ppvProject,
out int pfCanceled
)
int CreateProject(
String^ pszFilename,
String^ pszLocation,
String^ pszName,
unsigned int grfCreateFlags,
[InAttribute] Guid% iidProject,
[OutAttribute] IntPtr% ppvProject,
[OutAttribute] int% pfCanceled
)
abstract CreateProject :
pszFilename:string *
pszLocation:string *
pszName:string *
grfCreateFlags:uint32 *
iidProject:Guid byref *
ppvProject:nativeint byref *
pfCanceled:int byref -> int
Function CreateProject (
pszFilename As String,
pszLocation As String,
pszName As String,
grfCreateFlags As UInteger,
<InAttribute> ByRef iidProject As Guid,
<OutAttribute> ByRef ppvProject As IntPtr,
<OutAttribute> ByRef pfCanceled As Integer
) As Integer
Parametreler
- pszFilename
[in] Oluşturulacak proje dosya adı.
- pszLocation
[in] Projenin oluşturulduğu konumu.
- pszName
[in] Varsa, kullanılacak şablonu adını yeni bir proje kopyalama.
- grfCreateFlags
[in] Bayrak değerleri alınan __VSCREATEPROJFLAGS numaralandırma.
- iidProject
[in] Arayan istediği arabirim tanımlayıcısını döndürdü.
- ppvProject
[iid_is(iidProject) çıkış] İidProject tarafından belirtilen arabirim işaretçisi.
- pfCanceled
[Çıkış] Döndürür true kullanıcı İptal bu projenin oluşturulmasını iptal düğmesi.Aksi durumda ise false.
Dönüş Değeri
Type: System.Int32
Yöntem başarılı olursa, verir S_OK.Başarısız olursa, bir hata kodu döndürür.
Notlar
com imzası
Vsshell.idl:
HRESULT IVsProjectFactory::CreateProject(
[in] LPCOLESTR pszFilename,
[in] LPCOLESTR pszLocation,
[in] LPCOLESTR pszName,
[in] VSCREATEPROJFLAGS grfCreateFlags,
[in] REFIID iidProject,
[out, iid_is(iidProject)] void **ppvProject,
[out] BOOL *pfCanceled
);
CreateProjectbir kullanıcı yeni bir proje oluşturmaya çalıştığında kabuğu tarafından verilir.
(Hangi boş olabilir) varolan bir şablon proje Klonlama tarafından yeni bir proje yaratın.Ortam üzerindeki bu yöntemi çağırın VSPackage belirlemek için dosya uzantısını kullanır.
Ayrıca bkz.
IVsProjectFactory Arabirim
Microsoft.VisualStudio.Shell.Interop Ad Alanı
Başa dön