共用方式為


IXMLHTTPRequest3Callback::OnServerCertificateReceived 方法 (msxml6.h)

當用戶端在與伺服器的 SSL 交涉期間收到憑證錯誤或伺服器證書鏈結時發生。

語法

HRESULT OnServerCertificateReceived(
  [in] IXMLHTTPRequest3 *pXHR,
  [in] DWORD            dwCertificateErrors,
  [in] DWORD            cServerCertificateChain,
  [in] const XHR_CERT   *rgServerCertificateChain
);

參數

[in] pXHR

初始 HTTP 要求。

[in] dwCertificateErrors

HTTPS 連線中發生的憑證錯誤 (請參閱XHR_CERT_ERROR_FLAG) 。

[in] cServerCertificateChain

rgServerCertChain 參數中的元素數目。

[in] rgServerCertificateChain

表示伺服器證書鏈結之 XHR_CERT 結構的陣列。

傳回值

傳回成功 時S_OK

備註

注意 這個回呼方法不得擲回例外狀況。
 

規格需求

需求
最低支援的用戶端 Windows 8.1 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2012 R2 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 msxml6.h

另請參閱

IXMLHTTPRequest3

IXMLHTTPRequest3Callback

SetProperty

XHR_CERT

XHR_CERT_ERROR_FLAG