ホーム › AI.MachineLearning.WinML › IMLOperatorAttributes
IMLOperatorAttributes
COMメソッド 4
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT GetAttributeElementCount(LPSTR name, MLOperatorAttributeType type, DWORD* elementCount)
| name | LPSTR | in | 対象属性の名前を示す NULL 終端 ANSI 文字列である。 |
| type | MLOperatorAttributeType | in | 属性の型を示す MLOperatorAttributeType 列挙値である。 |
| elementCount | DWORD* | out | 属性の要素数を受け取る出力ポインタである。 |
vtbl 4 HRESULT GetAttribute(LPSTR name, MLOperatorAttributeType type, DWORD elementCount, UINT_PTR elementByteSize, void* value)
| name | LPSTR | in | 取得する属性の名前を示す NULL 終端 ANSI 文字列である。 |
| type | MLOperatorAttributeType | in | 期待する属性の型を示す MLOperatorAttributeType 列挙値である。 |
| elementCount | DWORD | in | 取得する要素数(value バッファの要素数)である。 |
| elementByteSize | UINT_PTR | in | 1 要素あたりのバイトサイズである。 |
| value | void* | out | 属性値を受け取る出力バッファへのポインタである。 |
vtbl 5 HRESULT GetStringAttributeElementLength(LPSTR name, DWORD elementIndex, DWORD* attributeElementByteSize)
| name | LPSTR | in | 対象の文字列属性の名前を示す NULL 終端 ANSI 文字列である。 |
| elementIndex | DWORD | in | 取得する文字列要素の 0 起点インデックスである。 |
| attributeElementByteSize | DWORD* | out | 終端を含む文字列要素のバイト長を受け取る出力ポインタである。 |
vtbl 6 HRESULT GetStringAttributeElement(LPSTR name, DWORD elementIndex, DWORD attributeElementByteSize, LPSTR attributeElement)
| name | LPSTR | in | 対象の文字列属性の名前を示す NULL 終端 ANSI 文字列である。 |
| elementIndex | DWORD | in | 取得する文字列要素の 0 起点インデックスである。 |
| attributeElementByteSize | DWORD | in | attributeElement バッファのバイトサイズである。 |
| attributeElement | LPSTR | out | 文字列要素を受け取る出力バッファへのポインタである。 |
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 指定が可能。#define global IID_IMLOperatorAttributes "{4B1B1759-EC40-466C-AAB4-BEB5347FD24C}" #usecom global IMLOperatorAttributes IID_IMLOperatorAttributes "{}" #comfunc global IMLOperatorAttributes_GetAttributeElementCount 3 str,int,sptr #comfunc global IMLOperatorAttributes_GetAttribute 4 str,int,int,sptr,sptr #comfunc global IMLOperatorAttributes_GetStringAttributeElementLength 5 str,int,sptr #comfunc global IMLOperatorAttributes_GetStringAttributeElement 6 str,int,int,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。