| CertificateStore Object : Find Method |
| Visual Basic |
|---|
Public Function Find( _ ByVal Name As String, _ ByVal Location As StoreLocationConstants, _ ByVal IssuedBy As String, _ ByVal SerialNumber As String _ ) As Certificate |
| Value | Description |
|---|---|
| locationCurrentUser | Store is located in the HKEY_CURRENT_USER registry key. |
| locationLocalMachine | Store is located in the HKEY_LOCAL_MACHINE registry key. |
| locationRemote | Used by a Certificate that is not part of a store. |
This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):
Private Sub Command_Click() On Error Goto OnError ' use intrinsic error handling 'Use CertificateStore to look-up security certificate desired Dim Store As New CertificateStore 'Get the specified certificate DartControl1.Certificate = Store.Find("ROOT", locationLocalMachine, g_SavedIssuedBy, g_SavedSerialNumber) Exit Sub OnError: Debug.Print "Error #" + CStr(Err.Number) + ": " + Err.Description End Sub