ホーム › Data.Xml.MsXml › IMXWriter
IMXWriter
COMIDispatch (デュアル)✅ IDispatch を実装(デュアルインターフェース)。HSP では
comobj 経由でメソッド名による遅延バインド呼び出しができます(vtableインデックス不要)。メソッド 17
vtbl = vtable インデックス(0始まり)。IDispatch 実装のため HSP ではメソッド名でも呼べます(上記)。低レベルの index 呼び出し用に vtbl も掲載。0〜2 は IUnknown。
| varDestination | VARIANT | in | 出力先を指定するVARIANT。IStream、DOMドキュメント、BSTR変数などを設定できる。 |
| varDestination | VARIANT* | out | 現在設定されている出力先を受け取るVARIANTの出力先。 |
| strEncoding | LPWSTR | in | 出力時の文字エンコーディング名(UTF-8、UTF-16など)を指定する。 |
| strEncoding | LPWSTR* | out | 現在設定されているエンコーディング名を受け取る出力先。 |
vtbl 11 HRESULT put_byteOrderMark(VARIANT_BOOL fWriteByteOrderMark)
| fWriteByteOrderMark | VARIANT_BOOL | in | BOM(バイトオーダーマーク)を書き出すかを示す真偽値。TRUEで出力する。 |
vtbl 12 HRESULT get_byteOrderMark(VARIANT_BOOL* fWriteByteOrderMark)
| fWriteByteOrderMark | VARIANT_BOOL* | out | BOMを書き出す設定かを受け取る真偽値の出力先。 |
vtbl 13 HRESULT put_indent(VARIANT_BOOL fIndentMode)
| fIndentMode | VARIANT_BOOL | in | 出力XMLを字下げ整形(インデント)するかを示す真偽値。TRUEで整形する。 |
vtbl 14 HRESULT get_indent(VARIANT_BOOL* fIndentMode)
| fIndentMode | VARIANT_BOOL* | out | インデント整形が有効かを受け取る真偽値の出力先。 |
vtbl 15 HRESULT put_standalone(VARIANT_BOOL fValue)
| fValue | VARIANT_BOOL | in | XML宣言にstandalone="yes"を出力するかを示す真偽値。 |
vtbl 16 HRESULT get_standalone(VARIANT_BOOL* fValue)
| fValue | VARIANT_BOOL* | out | standalone設定が有効かを受け取る真偽値の出力先。 |
vtbl 17 HRESULT put_omitXMLDeclaration(VARIANT_BOOL fValue)
| fValue | VARIANT_BOOL | in | XML宣言(<?xml ...?>)の出力を省略するかを示す真偽値。TRUEで省略する。 |
vtbl 18 HRESULT get_omitXMLDeclaration(VARIANT_BOOL* fValue)
| fValue | VARIANT_BOOL* | out | XML宣言を省略する設定かを受け取る真偽値の出力先。 |
| strVersion | LPWSTR | in | XML宣言に出力するXMLバージョン文字列("1.0"など)。 |
| strVersion | LPWSTR* | out | 現在設定されているXMLバージョン文字列を受け取る出力先。 |
vtbl 21 HRESULT put_disableOutputEscaping(VARIANT_BOOL fValue)
| fValue | VARIANT_BOOL | in | 出力時に特殊文字のエスケープを無効化するかを示す真偽値。 |
vtbl 22 HRESULT get_disableOutputEscaping(VARIANT_BOOL* fValue)
| fValue | VARIANT_BOOL* | out | 出力エスケープ無効化が有効かを受け取る真偽値の出力先。 |
vtbl 23 HRESULT flush()
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IMXWriter "{4D7FF4BA-1565-4EA8-94E1-6E724A46F98D}" #usecom global IMXWriter IID_IMXWriter "{}" #comfunc global IMXWriter_put_output 7 int #comfunc global IMXWriter_get_output 8 var #comfunc global IMXWriter_put_encoding 9 wstr #comfunc global IMXWriter_get_encoding 10 var #comfunc global IMXWriter_put_byteOrderMark 11 int #comfunc global IMXWriter_get_byteOrderMark 12 var #comfunc global IMXWriter_put_indent 13 int #comfunc global IMXWriter_get_indent 14 var #comfunc global IMXWriter_put_standalone 15 int #comfunc global IMXWriter_get_standalone 16 var #comfunc global IMXWriter_put_omitXMLDeclaration 17 int #comfunc global IMXWriter_get_omitXMLDeclaration 18 var #comfunc global IMXWriter_put_version 19 wstr #comfunc global IMXWriter_get_version 20 var #comfunc global IMXWriter_put_disableOutputEscaping 21 int #comfunc global IMXWriter_get_disableOutputEscaping 22 var #comfunc global IMXWriter_flush 23 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。#define global IID_IMXWriter "{4D7FF4BA-1565-4EA8-94E1-6E724A46F98D}" #usecom global IMXWriter IID_IMXWriter "{}" #comfunc global IMXWriter_put_output 7 int #comfunc global IMXWriter_get_output 8 sptr #comfunc global IMXWriter_put_encoding 9 wstr #comfunc global IMXWriter_get_encoding 10 sptr #comfunc global IMXWriter_put_byteOrderMark 11 int #comfunc global IMXWriter_get_byteOrderMark 12 sptr #comfunc global IMXWriter_put_indent 13 int #comfunc global IMXWriter_get_indent 14 sptr #comfunc global IMXWriter_put_standalone 15 int #comfunc global IMXWriter_get_standalone 16 sptr #comfunc global IMXWriter_put_omitXMLDeclaration 17 int #comfunc global IMXWriter_get_omitXMLDeclaration 18 sptr #comfunc global IMXWriter_put_version 19 wstr #comfunc global IMXWriter_get_version 20 sptr #comfunc global IMXWriter_put_disableOutputEscaping 21 int #comfunc global IMXWriter_get_disableOutputEscaping 22 sptr #comfunc global IMXWriter_flush 23 ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※IDispatch 実装。HSP では comobj 経由でメソッド名による呼び出しも可能(vtbl 不要)。