Win32 API 日本語リファレンス
ホームNetworking.ActiveDirectory › IPersistQuery

IPersistQuery

COM
IID1a3114b8-a62e-11d0-a6c5-00a0c906af45継承元IPersist自前メソッド開始 vtbl4

メソッド 7

vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。

vtbl 4 HRESULT WriteString(LPWSTR pSection, LPWSTR pValueName, LPWSTR pValue)
pSectionLPWSTRin書き込み先のセクション名を示す文字列。
pValueNameLPWSTRin書き込む値の名前を示す文字列。
pValueLPWSTRin保存する文字列値。
vtbl 5 HRESULT ReadString(LPWSTR pSection, LPWSTR pValueName, LPWSTR pBuffer, INT cchBuffer)
pSectionLPWSTRin読み取り元のセクション名を示す文字列。
pValueNameLPWSTRin読み取る値の名前を示す文字列。
pBufferLPWSTRout読み取った文字列を受け取るバッファ。
cchBufferINTinpBufferの容量を文字数で指定する値。
vtbl 6 HRESULT WriteInt(LPWSTR pSection, LPWSTR pValueName, INT value)
pSectionLPWSTRin書き込み先のセクション名を示す文字列。
pValueNameLPWSTRin書き込む値の名前を示す文字列。
valueINTin保存する整数値。
vtbl 7 HRESULT ReadInt(LPWSTR pSection, LPWSTR pValueName, INT* pValue)
pSectionLPWSTRin読み取り元のセクション名を示す文字列。
pValueNameLPWSTRin読み取る値の名前を示す文字列。
pValueINT*inout読み取った整数値を受け取る出力ポインタ。
vtbl 8 HRESULT WriteStruct(LPWSTR pSection, LPWSTR pValueName, void* pStruct, DWORD cbStruct)
pSectionLPWSTRin書き込み先のセクション名を示す文字列。
pValueNameLPWSTRin書き込む値の名前を示す文字列。
pStructvoid*inout保存する構造体データへのポインタ。
cbStructDWORDin保存する構造体のバイト数。
vtbl 9 HRESULT ReadStruct(LPWSTR pSection, LPWSTR pValueName, void* pStruct, DWORD cbStruct)
pSectionLPWSTRin読み取り元のセクション名を示す文字列。
pValueNameLPWSTRin読み取る値の名前を示す文字列。
pStructvoid*inout読み取った構造体データを受け取るバッファへのポインタ。
cbStructDWORDin受け取る構造体のバイト数。
vtbl 10 HRESULT Clear()

HSP用 COM定義

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

出力引数:
#define global IID_IPersistQuery "{1A3114B8-A62E-11D0-A6C5-00A0C906AF45}"
#usecom global IPersistQuery IID_IPersistQuery "{}"
#comfunc global IPersistQuery_WriteString  4 wstr,wstr,wstr
#comfunc global IPersistQuery_ReadString   5 wstr,wstr,var,int
#comfunc global IPersistQuery_WriteInt     6 wstr,wstr,int
#comfunc global IPersistQuery_ReadInt      7 wstr,wstr,var
#comfunc global IPersistQuery_WriteStruct  8 wstr,wstr,sptr,int
#comfunc global IPersistQuery_ReadStruct   9 wstr,wstr,sptr,int
#comfunc global IPersistQuery_Clear        10
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。