Win32 API 日本語リファレンス
ホームAI.MachineLearning.WinML › IMLOperatorAttributes

IMLOperatorAttributes

COM
IID4b1b1759-ec40-466c-aab4-beb5347fd24c継承元IUnknown自前メソッド開始 vtbl3

メソッド 4

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

vtbl 3 HRESULT GetAttributeElementCount(LPSTR name, MLOperatorAttributeType type, DWORD* elementCount)
nameLPSTRin対象属性の名前を示す NULL 終端 ANSI 文字列である。
typeMLOperatorAttributeTypein属性の型を示す MLOperatorAttributeType 列挙値である。
elementCountDWORD*out属性の要素数を受け取る出力ポインタである。
vtbl 4 HRESULT GetAttribute(LPSTR name, MLOperatorAttributeType type, DWORD elementCount, UINT_PTR elementByteSize, void* value)
nameLPSTRin取得する属性の名前を示す NULL 終端 ANSI 文字列である。
typeMLOperatorAttributeTypein期待する属性の型を示す MLOperatorAttributeType 列挙値である。
elementCountDWORDin取得する要素数(value バッファの要素数)である。
elementByteSizeUINT_PTRin1 要素あたりのバイトサイズである。
valuevoid*out属性値を受け取る出力バッファへのポインタである。
vtbl 5 HRESULT GetStringAttributeElementLength(LPSTR name, DWORD elementIndex, DWORD* attributeElementByteSize)
nameLPSTRin対象の文字列属性の名前を示す NULL 終端 ANSI 文字列である。
elementIndexDWORDin取得する文字列要素の 0 起点インデックスである。
attributeElementByteSizeDWORD*out終端を含む文字列要素のバイト長を受け取る出力ポインタである。
vtbl 6 HRESULT GetStringAttributeElement(LPSTR name, DWORD elementIndex, DWORD attributeElementByteSize, LPSTR attributeElement)
nameLPSTRin対象の文字列属性の名前を示す NULL 終端 ANSI 文字列である。
elementIndexDWORDin取得する文字列要素の 0 起点インデックスである。
attributeElementByteSizeDWORDinattributeElement バッファのバイトサイズである。
attributeElementLPSTRout文字列要素を受け取る出力バッファへのポインタである。

HSP用 COM定義

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

出力引数:
#define global IID_IMLOperatorAttributes "{4B1B1759-EC40-466C-AAB4-BEB5347FD24C}"
#usecom global IMLOperatorAttributes IID_IMLOperatorAttributes "{}"
#comfunc global IMLOperatorAttributes_GetAttributeElementCount         3 str,int,var
#comfunc global IMLOperatorAttributes_GetAttribute                     4 str,int,int,sptr,sptr
#comfunc global IMLOperatorAttributes_GetStringAttributeElementLength  5 str,int,var
#comfunc global IMLOperatorAttributes_GetStringAttributeElement        6 str,int,int,var
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。