ExecuteFormFieldScriptJSONA
フォーム、JavaScriptの安全性
説明
末尾の A は ANSI(char)DLL エントリポイントを示します。ActiveX/COM インターフェースでは Unicode 形式のみを公開します。動作は ExecuteFormFieldScriptJSON と同じで、文字列引数は現在の SetAnsiMode コードページを使用して解釈されます
フィールドの validate、calculate、format、keystroke アクションを実行し、結果とイベント状態を JSON で返します。DLL と ActiveX インターフェース向けに ExecuteFormFieldScriptEvent の機能を提供します
構文
Delphi
Function DLExecuteFormFieldScriptJSONA(InstanceID, Index, Action: Integer; Value, Change: PAnsiChar; SelStart, SelEnd, Flags: Integer): PAnsiChar;
DLL
const char* DLExecuteFormFieldScriptJSONA(int InstanceID, int Index, int Action, const char* Value, const char* Change, int SelStart, int SelEnd, int Flags);
パラメータ
| Index | 1 起算のフィールドインデックス |
|---|---|
| Action | 0 validate、1 calculate、2 format、3 keystroke |
| Value, Change | 初期の event.value と event.change |
| SelStart, SelEnd | 変更で置き換えられる選択範囲 |
| Flags | 1 willCommit、2 fieldFull、4 keyDown、8 modifier、16 shift の合計 |
戻り値
result(ExecuteFormFieldScriptEvent の戻り値)、value、change、rc、selStart、selEnd を含む JSON オブジェクト。無効な Action は LastErrorCode 708 で {"result":0} を返します
ソースフィールドはターゲットフィールドです。DLL の文字列はインスタンスのリターンバッファに属するため、次の呼び出しの前にコピーしてください
関連項目
ExecuteFormFieldScriptEvent, SetFormScriptHostActionMode, GetFormScriptDiagnostics