IVsProjectServerHost.StartServer(String, UInt32) 方法

定义

为托管服务器创建进程。

public:
 int StartServer(System::String ^ bstrEnvironment, [Runtime::InteropServices::Out] System::UInt32 % pdwProcessId);
int StartServer(std::wstring const & bstrEnvironment, [Runtime::InteropServices::Out] unsigned int & pdwProcessId);
public int StartServer (string bstrEnvironment, out uint pdwProcessId);
abstract member StartServer : string * uint32 -> int
Public Function StartServer (bstrEnvironment As String, ByRef pdwProcessId As UInteger) As Integer

参数

bstrEnvironment
String

启动服务器的环境。 如果未指定,则使用默认环境。

pdwProcessId
UInt32

新进程的 ID。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

如果服务器已在运行,则此方法不起作用。

bstrEnvironment参数包含以 null 结尾的字符串的列表,该列表由 DOUBLE null {\ 0 \ 0} 终止。 复制此 BSTR 时,必须使用适当的方法 (如使用 SysAllocStringLen) 。

COM 签名

从 vsshell90:

HRESULT StartServer(  
    [in, ptr] BSTR bstrEnvironment,   
    [out, retval] DWORD * pdwProcessId  
);  

适用于