共用方式為


IVsStrongNameKeys.CreateNewKeyWithName(String, String, String) Method

Definition

Create a new key to be used for signing, exporting to a file, and creating a new key container, for the specified name.

public:
 int CreateNewKeyWithName(System::String ^ szFile, System::String ^ szPassword, System::String ^ szSubjectName);
public:
 int CreateNewKeyWithName(Platform::String ^ szFile, Platform::String ^ szPassword, Platform::String ^ szSubjectName);
int CreateNewKeyWithName(std::wstring const & szFile, std::wstring const & szPassword, std::wstring const & szSubjectName);
public int CreateNewKeyWithName (string szFile, string szPassword, string szSubjectName);
abstract member CreateNewKeyWithName : string * string * string -> int
Public Function CreateNewKeyWithName (szFile As String, szPassword As String, szSubjectName As String) As Integer

Parameters

szFile
String

[in] The file in which to store the encryption key.

szPassword
String

[in] The password for the key being generated.

szSubjectName
String

[in] The name that goes after “CN=” in the certificate name.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Applies to