IVsStrongNameKeys2.CreateNewKey2(String, String) 方法

定义

创建要用于签名、导出到文件和创建新密钥容器的新密钥。

public:
 int CreateNewKey2(System::String ^ szFileLocation, [Runtime::InteropServices::Out] System::String ^ % pbstrFileName);
int CreateNewKey2(std::wstring const & szFileLocation, [Runtime::InteropServices::Out] std::wstring const & & pbstrFileName);
public int CreateNewKey2 (string szFileLocation, out string pbstrFileName);
abstract member CreateNewKey2 : string * string -> int
Public Function CreateNewKey2 (szFileLocation As String, ByRef pbstrFileName As String) As Integer

参数

szFileLocation
String

中用于保存密钥文件的位置。

pbstrFileName
String

中要在其中存储密钥的文件的名称。

返回

Int32

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

注解

此方法提供了额外的 Ui,以允许用户从要使用的签名算法列表中进行选择。 目前,组合框中仅支持 SHA-1 和 SHA-256。

适用于