IVsCfgProvider2.GetPlatformNames(UInt32, String[], UInt32[]) 方法

定义

返回一个或多个平台名称。

int GetPlatformNames(unsigned int celt, std::Array <std::wstring const &> const & rgbstr, std::Array <unsigned int> const & pcActual);
public int GetPlatformNames (uint celt, string[] rgbstr, uint[] pcActual);
abstract member GetPlatformNames : uint32 * string[] * uint32[] -> int
Public Function GetPlatformNames (celt As UInteger, rgbstr As String(), Optional pcActual As UInteger()) As Integer

参数

celt
UInt32

中指定所请求的平台名称数。 如果此数字未知,则 celt 可以为零。

rgbstr
String[]

[in,out,size_is (celt) ]在输入中,是一个分配的数组,用于保存由指定的平台名称的数目 celtnull 如果参数为零,则此参数也可以为 celt 。 输出时 rgbstr 包含平台名称。

pcActual
UInt32[]

[out,optional]一个指针,指向返回的平台名称的实际数量的计数。

返回

Int32

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

注解

COM 签名

从 vsshell:

HRESULT IVsCfgProvider2::GetPlatformNames(  
   [in] ULONG celt,  
   [in, out, size_is(celt)] BSTR rgbstr[],  
   [out, optional] ULONG *pcActual  
);  

通常对进行两次调用 GetPlatformNames 。 使用第一次调用 celt 时,将设置为零,将设置为,并将设置为 rgbstr null pcActual 有效地址。 GetPlatformNames 返回并 pcActual 指向可用的平台名称数。 调用方使用此信息分配 rgbstr 到适当的大小,并 GetPlatformNames 将设置为的内容第二次调用 celt pcActual

适用于