ホーム › Devices.Tapi › MSP_EVENT_INFO
MSP_EVENT_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSize | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で示す。可変データを含む全体長。 |
| Event | MSP_EVENT | 4 | +4 | +4 | MSPイベントの種別を示すMSP_EVENT列挙値。 |
| hCall | INT* | 8/4 | +8 | +8 | イベントに関連するTAPI通話ハンドルへのポインタ。 |
| Anonymous | _Anonymous_e__Union | 8/4 | +16 | +12 | イベント種別ごとに異なる詳細情報を格納する無名共用体。 |
共用体: _Anonymous_e__Union x64 8B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| MSP_ADDRESS_EVENT_INFO | _MSP_ADDRESS_EVENT_INFO_e__Struct | 8/4 | +0 | +0 |
| MSP_CALL_EVENT_INFO | _MSP_CALL_EVENT_INFO_e__Struct | 8/4 | +0 | +0 |
| MSP_TSP_DATA | _MSP_TSP_DATA_e__Struct | 8/4 | +0 | +0 |
| MSP_PRIVATE_EVENT_INFO | _MSP_PRIVATE_EVENT_INFO_e__Struct | 8/4 | +0 | +0 |
| MSP_FILE_TERMINAL_EVENT_INFO | _MSP_FILE_TERMINAL_EVENT_INFO_e__Struct | 8/4 | +0 | +0 |
| MSP_ASR_TERMINAL_EVENT_INFO | _MSP_ASR_TERMINAL_EVENT_INFO_e__Struct | 8/4 | +0 | +0 |
| MSP_TTS_TERMINAL_EVENT_INFO | _MSP_TTS_TERMINAL_EVENT_INFO_e__Struct | 8/4 | +0 | +0 |
| MSP_TONE_TERMINAL_EVENT_INFO | _MSP_TONE_TERMINAL_EVENT_INFO_e__Struct | 8/4 | +0 | +0 |
各言語での定義
#include <windows.h>
// MSP_EVENT_INFO (x64 24 / x86 16 バイト)
typedef struct MSP_EVENT_INFO {
DWORD dwSize;
MSP_EVENT Event;
INT* hCall;
_Anonymous_e__Union Anonymous;
} MSP_EVENT_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MSP_EVENT_INFO
{
public uint dwSize;
public int Event;
public IntPtr hCall;
public _Anonymous_e__Union Anonymous;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MSP_EVENT_INFO
Public dwSize As UInteger
Public Event As Integer
Public hCall As IntPtr
Public Anonymous As _Anonymous_e__Union
End Structureimport ctypes
from ctypes import wintypes
class MSP_EVENT_INFO(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("Event", ctypes.c_int),
("hCall", ctypes.c_void_p),
("Anonymous", _Anonymous_e__Union),
]#[repr(C)]
pub struct MSP_EVENT_INFO {
pub dwSize: u32,
pub Event: i32,
pub hCall: *mut core::ffi::c_void,
pub Anonymous: _Anonymous_e__Union,
}import "golang.org/x/sys/windows"
type MSP_EVENT_INFO struct {
dwSize uint32
Event int32
hCall uintptr
Anonymous _Anonymous_e__Union
}type
MSP_EVENT_INFO = record
dwSize: DWORD;
Event: Integer;
hCall: Pointer;
Anonymous: _Anonymous_e__Union;
end;const MSP_EVENT_INFO = extern struct {
dwSize: u32,
Event: i32,
hCall: ?*anyopaque,
Anonymous: _Anonymous_e__Union,
};type
MSP_EVENT_INFO {.bycopy.} = object
dwSize: uint32
Event: int32
hCall: pointer
Anonymous: _Anonymous_e__Unionstruct MSP_EVENT_INFO
{
uint dwSize;
int Event;
void* hCall;
_Anonymous_e__Union Anonymous;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MSP_EVENT_INFO サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Event : MSP_EVENT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; hCall : INT* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+12, 4byte) varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MSP_EVENT_INFO サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Event : MSP_EVENT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; hCall : INT* (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; Anonymous : _Anonymous_e__Union (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MSP_EVENT_INFO
#field int dwSize
#field int Event
#field intptr hCall
#field byte Anonymous 8
#endstruct
stdim st, MSP_EVENT_INFO ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。