IVsSccProjectEnlistmentFactory.OnBeforeEnlistmentCreate 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
允许项目在实际创建登记之前执行任何特殊操作。
public:
int OnBeforeEnlistmentCreate(System::String ^ lpszProjectPath, System::String ^ lpszEnlistment, System::String ^ lpszEnlistmentUNC);
public:
int OnBeforeEnlistmentCreate(Platform::String ^ lpszProjectPath, Platform::String ^ lpszEnlistment, Platform::String ^ lpszEnlistmentUNC);
int OnBeforeEnlistmentCreate(std::wstring const & lpszProjectPath, std::wstring const & lpszEnlistment, std::wstring const & lpszEnlistmentUNC);
public int OnBeforeEnlistmentCreate (string lpszProjectPath, string lpszEnlistment, string lpszEnlistmentUNC);
abstract member OnBeforeEnlistmentCreate : string * string * string -> int
Public Function OnBeforeEnlistmentCreate (lpszProjectPath As String, lpszEnlistment As String, lpszEnlistmentUNC As String) As Integer
参数
- lpszProjectPath
- String
中原始项目路径。
- lpszEnlistment
- String
中要使用的登记路径。
- lpszEnlistmentUNC
- String
中作为完全限定路径的登记路径 (UNC 样式,[drive:] \path 或 file://path) 。
返回
如果该方法成功,则它会返回 S_OK。 如果失败,则返回错误代码。如果此方法返回错误代码,则不会创建登记。
注解
COM 签名
从 ivssccprojectenlistmentfactory
HRESULT OnBeforeEnlistmentCreate(
[in] LPCOLESTR lpszProjectPath,
[in] LPCOLESTR lpszEnlistment,
[in] LPCOLESTR lpszEnlistmentUNC
);
此方法允许项目类型在创建登记之前执行任何必需的特殊设置。 此类安装程序可能会创建到源代码管理服务器的共享,或者在内存中初始化可能需要的任何数据结构。
此方法中的任何操作都可以在方法中反转 OnAfterEnlistmentCreate ,此方法在创建登记后调用。