Win32 API 日本語リファレンス
ホームSystem.Com.ChannelCredentials › IChannelCredentials

IChannelCredentials

COMIDispatch (デュアル)
IDispatch を実装(デュアルインターフェース)。HSP では comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。
IID181b448c-c17c-4b17-ac6d-06699b93198f継承元IDispatch呼び出し名前(IDispatch) または vtbl自前メソッド開始 vtbl7

メソッド 10

vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。

vtbl 7 HRESULT SetWindowsCredential(LPWSTR domain, LPWSTR username, LPWSTR password, INT impersonationLevel, BOOL allowNtlm)
domainLPWSTRin認証に使用する Windows 資格情報のドメイン名を指定する。
usernameLPWSTRin認証に使用するユーザー名を指定する。
passwordLPWSTRin認証に使用するパスワードを指定する。
impersonationLevelINTinサーバーに許可する偽装レベルを指定する。
allowNtlmBOOLinNTLM 認証へのフォールバックを許可するかどうかを指定する。
vtbl 8 HRESULT SetUserNameCredential(LPWSTR username, LPWSTR password)
usernameLPWSTRin認証に使用するユーザー名を指定する。
passwordLPWSTRin認証に使用するパスワードを指定する。
vtbl 9 HRESULT SetClientCertificateFromStore(LPWSTR storeLocation, LPWSTR storeName, LPWSTR findYype, VARIANT findValue)
storeLocationLPWSTRinクライアント証明書を検索する証明書ストアの場所(CurrentUser または LocalMachine)を指定する。
storeNameLPWSTRinクライアント証明書を検索する証明書ストアの名前を指定する。
findYypeLPWSTRin証明書の検索方法(検索条件の種類)を指定する。
findValueVARIANTin検索条件として照合する値を格納した VARIANT を指定する。
vtbl 10 HRESULT SetClientCertificateFromStoreByName(LPWSTR subjectName, LPWSTR storeLocation, LPWSTR storeName)
subjectNameLPWSTRinクライアント証明書を特定するためのサブジェクト名を指定する。
storeLocationLPWSTRin証明書を検索する証明書ストアの場所(CurrentUser または LocalMachine)を指定する。
storeNameLPWSTRin証明書を検索する証明書ストアの名前を指定する。
vtbl 11 HRESULT SetClientCertificateFromFile(LPWSTR filename, LPWSTR password, LPWSTR keystorageFlags)
filenameLPWSTRinクライアント証明書を読み込むファイルのパスを指定する。
passwordLPWSTRin証明書ファイルを保護しているパスワードを指定する。
keystorageFlagsLPWSTRin秘密鍵の格納方法を制御するフラグを指定する。
vtbl 12 HRESULT SetDefaultServiceCertificateFromStore(LPWSTR storeLocation, LPWSTR storeName, LPWSTR findType, VARIANT findValue)
storeLocationLPWSTRin既定のサービス証明書を検索する証明書ストアの場所を指定する。
storeNameLPWSTRin既定のサービス証明書を検索する証明書ストアの名前を指定する。
findTypeLPWSTRin証明書の検索方法(検索条件の種類)を指定する。
findValueVARIANTin検索条件として照合する値を格納した VARIANT を指定する。
vtbl 13 HRESULT SetDefaultServiceCertificateFromStoreByName(LPWSTR subjectName, LPWSTR storeLocation, LPWSTR storeName)
subjectNameLPWSTRin既定のサービス証明書を特定するためのサブジェクト名を指定する。
storeLocationLPWSTRin証明書を検索する証明書ストアの場所を指定する。
storeNameLPWSTRin証明書を検索する証明書ストアの名前を指定する。
vtbl 14 HRESULT SetDefaultServiceCertificateFromFile(LPWSTR filename, LPWSTR password, LPWSTR keystorageFlags)
filenameLPWSTRin既定のサービス証明書を読み込むファイルのパスを指定する。
passwordLPWSTRin証明書ファイルを保護しているパスワードを指定する。
keystorageFlagsLPWSTRin秘密鍵の格納方法を制御するフラグを指定する。
vtbl 15 HRESULT SetServiceCertificateAuthentication(LPWSTR storeLocation, LPWSTR revocationMode, LPWSTR certificateValidationMode)
storeLocationLPWSTRinサービス証明書の検証に使用する証明書ストアの場所を指定する。
revocationModeLPWSTRin証明書失効の確認モードを指定する。
certificateValidationModeLPWSTRin証明書の検証モードを指定する。
vtbl 16 HRESULT SetIssuedToken(LPWSTR localIssuerAddres, LPWSTR localIssuerBindingType, LPWSTR localIssuerBinding)
localIssuerAddresLPWSTRinローカルの発行者(セキュリティトークンサービス)のアドレスを指定する。
localIssuerBindingTypeLPWSTRinローカル発行者との通信に使用するバインディングの種類を指定する。
localIssuerBindingLPWSTRinローカル発行者との通信に使用するバインディングの構成を指定する。

HSP用 COM定義

#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"

#define global IID_IChannelCredentials "{181B448C-C17C-4B17-AC6D-06699B93198F}"
#usecom global IChannelCredentials IID_IChannelCredentials "{}"
#comfunc global IChannelCredentials_SetWindowsCredential                         7 wstr,wstr,wstr,int,int
#comfunc global IChannelCredentials_SetUserNameCredential                        8 wstr,wstr
#comfunc global IChannelCredentials_SetClientCertificateFromStore                9 wstr,wstr,wstr,int
#comfunc global IChannelCredentials_SetClientCertificateFromStoreByName          10 wstr,wstr,wstr
#comfunc global IChannelCredentials_SetClientCertificateFromFile                 11 wstr,wstr,wstr
#comfunc global IChannelCredentials_SetDefaultServiceCertificateFromStore        12 wstr,wstr,wstr,int
#comfunc global IChannelCredentials_SetDefaultServiceCertificateFromStoreByName  13 wstr,wstr,wstr
#comfunc global IChannelCredentials_SetDefaultServiceCertificateFromFile         14 wstr,wstr,wstr
#comfunc global IChannelCredentials_SetServiceCertificateAuthentication          15 wstr,wstr,wstr
#comfunc global IChannelCredentials_SetIssuedToken                               16 wstr,wstr,wstr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。