ホーム › Media.Speech › SPEVENTSOURCEINFO
SPEVENTSOURCEINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ullEventInterest | ULONGLONG | 8 | +0 | +0 | アプリが関心を持つイベント種別のビットマスク。 |
| ullQueuedInterest | ULONGLONG | 8 | +8 | +8 | キューイング(蓄積)を要求するイベント種別のビットマスク。 |
| ulCount | DWORD | 4 | +16 | +16 | 現在キューに蓄積されているイベント数。 |
各言語での定義
#include <windows.h>
// SPEVENTSOURCEINFO (x64 24 / x86 24 バイト)
typedef struct SPEVENTSOURCEINFO {
ULONGLONG ullEventInterest;
ULONGLONG ullQueuedInterest;
DWORD ulCount;
} SPEVENTSOURCEINFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SPEVENTSOURCEINFO
{
public ulong ullEventInterest;
public ulong ullQueuedInterest;
public uint ulCount;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SPEVENTSOURCEINFO
Public ullEventInterest As ULong
Public ullQueuedInterest As ULong
Public ulCount As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SPEVENTSOURCEINFO(ctypes.Structure):
_fields_ = [
("ullEventInterest", ctypes.c_ulonglong),
("ullQueuedInterest", ctypes.c_ulonglong),
("ulCount", wintypes.DWORD),
]#[repr(C)]
pub struct SPEVENTSOURCEINFO {
pub ullEventInterest: u64,
pub ullQueuedInterest: u64,
pub ulCount: u32,
}import "golang.org/x/sys/windows"
type SPEVENTSOURCEINFO struct {
ullEventInterest uint64
ullQueuedInterest uint64
ulCount uint32
}type
SPEVENTSOURCEINFO = record
ullEventInterest: UInt64;
ullQueuedInterest: UInt64;
ulCount: DWORD;
end;const SPEVENTSOURCEINFO = extern struct {
ullEventInterest: u64,
ullQueuedInterest: u64,
ulCount: u32,
};type
SPEVENTSOURCEINFO {.bycopy.} = object
ullEventInterest: uint64
ullQueuedInterest: uint64
ulCount: uint32struct SPEVENTSOURCEINFO
{
ulong ullEventInterest;
ulong ullQueuedInterest;
uint ulCount;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SPEVENTSOURCEINFO サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; ullEventInterest : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; ullQueuedInterest : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ulCount : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SPEVENTSOURCEINFO
#field int64 ullEventInterest
#field int64 ullQueuedInterest
#field int ulCount
#endstruct
stdim st, SPEVENTSOURCEINFO ; NSTRUCT 変数を確保
st->ullEventInterest = 100
mes "ullEventInterest=" + st->ullEventInterest