ホーム › Media.DirectShow.Tv › DSMCC_FILTER_OPTIONS
DSMCC_FILTER_OPTIONS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| fSpecifyProtocol | BOOL | 4 | +0 | +0 | プロトコルでフィルタするか否か(BOOL)。 |
| Protocol | BYTE | 1 | +4 | +4 | フィルタ対象のプロトコル値。 |
| fSpecifyType | BOOL | 4 | +5 | +5 | タイプでフィルタするか否か(BOOL)。 |
| Type | BYTE | 1 | +9 | +9 | フィルタ対象のタイプ値。 |
| fSpecifyMessageId | BOOL | 4 | +10 | +10 | メッセージIDでフィルタするか否か(BOOL)。 |
| MessageId | WORD | 2 | +14 | +14 | フィルタ対象のメッセージID。 |
| fSpecifyTransactionId | BOOL | 4 | +16 | +16 | トランザクションIDでフィルタするか否か(BOOL)。 |
| fUseTrxIdMessageIdMask | BOOL | 4 | +20 | +20 | トランザクション/メッセージIDマスクを使うか否か(BOOL)。 |
| TransactionId | DWORD | 4 | +24 | +24 | フィルタ対象のトランザクションID。 |
| fSpecifyModuleVersion | BOOL | 4 | +28 | +28 | モジュールバージョンでフィルタするか否か(BOOL)。 |
| ModuleVersion | BYTE | 1 | +32 | +32 | フィルタ対象のモジュールバージョン。 |
| fSpecifyBlockNumber | BOOL | 4 | +33 | +33 | ブロック番号でフィルタするか否か(BOOL)。 |
| BlockNumber | WORD | 2 | +37 | +37 | フィルタ対象のブロック番号。 |
| fGetModuleCall | BOOL | 4 | +39 | +39 | モジュール取得呼び出しか否か(BOOL)。 |
| NumberOfBlocksInModule | WORD | 2 | +43 | +43 | モジュール内の総ブロック数。 |
各言語での定義
#include <windows.h>
// DSMCC_FILTER_OPTIONS (x64 45 / x86 45 バイト)
#pragma pack(push, 1)
typedef struct DSMCC_FILTER_OPTIONS {
BOOL fSpecifyProtocol;
BYTE Protocol;
BOOL fSpecifyType;
BYTE Type;
BOOL fSpecifyMessageId;
WORD MessageId;
BOOL fSpecifyTransactionId;
BOOL fUseTrxIdMessageIdMask;
DWORD TransactionId;
BOOL fSpecifyModuleVersion;
BYTE ModuleVersion;
BOOL fSpecifyBlockNumber;
WORD BlockNumber;
BOOL fGetModuleCall;
WORD NumberOfBlocksInModule;
} DSMCC_FILTER_OPTIONS;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct DSMCC_FILTER_OPTIONS
{
[MarshalAs(UnmanagedType.Bool)] public bool fSpecifyProtocol;
public byte Protocol;
[MarshalAs(UnmanagedType.Bool)] public bool fSpecifyType;
public byte Type;
[MarshalAs(UnmanagedType.Bool)] public bool fSpecifyMessageId;
public ushort MessageId;
[MarshalAs(UnmanagedType.Bool)] public bool fSpecifyTransactionId;
[MarshalAs(UnmanagedType.Bool)] public bool fUseTrxIdMessageIdMask;
public uint TransactionId;
[MarshalAs(UnmanagedType.Bool)] public bool fSpecifyModuleVersion;
public byte ModuleVersion;
[MarshalAs(UnmanagedType.Bool)] public bool fSpecifyBlockNumber;
public ushort BlockNumber;
[MarshalAs(UnmanagedType.Bool)] public bool fGetModuleCall;
public ushort NumberOfBlocksInModule;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure DSMCC_FILTER_OPTIONS
<MarshalAs(UnmanagedType.Bool)> Public fSpecifyProtocol As Boolean
Public Protocol As Byte
<MarshalAs(UnmanagedType.Bool)> Public fSpecifyType As Boolean
Public Type As Byte
<MarshalAs(UnmanagedType.Bool)> Public fSpecifyMessageId As Boolean
Public MessageId As UShort
<MarshalAs(UnmanagedType.Bool)> Public fSpecifyTransactionId As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fUseTrxIdMessageIdMask As Boolean
Public TransactionId As UInteger
<MarshalAs(UnmanagedType.Bool)> Public fSpecifyModuleVersion As Boolean
Public ModuleVersion As Byte
<MarshalAs(UnmanagedType.Bool)> Public fSpecifyBlockNumber As Boolean
Public BlockNumber As UShort
<MarshalAs(UnmanagedType.Bool)> Public fGetModuleCall As Boolean
Public NumberOfBlocksInModule As UShort
End Structureimport ctypes
from ctypes import wintypes
class DSMCC_FILTER_OPTIONS(ctypes.Structure):
_pack_ = 1
_fields_ = [
("fSpecifyProtocol", wintypes.BOOL),
("Protocol", ctypes.c_ubyte),
("fSpecifyType", wintypes.BOOL),
("Type", ctypes.c_ubyte),
("fSpecifyMessageId", wintypes.BOOL),
("MessageId", ctypes.c_ushort),
("fSpecifyTransactionId", wintypes.BOOL),
("fUseTrxIdMessageIdMask", wintypes.BOOL),
("TransactionId", wintypes.DWORD),
("fSpecifyModuleVersion", wintypes.BOOL),
("ModuleVersion", ctypes.c_ubyte),
("fSpecifyBlockNumber", wintypes.BOOL),
("BlockNumber", ctypes.c_ushort),
("fGetModuleCall", wintypes.BOOL),
("NumberOfBlocksInModule", ctypes.c_ushort),
]#[repr(C, packed(1))]
pub struct DSMCC_FILTER_OPTIONS {
pub fSpecifyProtocol: i32,
pub Protocol: u8,
pub fSpecifyType: i32,
pub Type: u8,
pub fSpecifyMessageId: i32,
pub MessageId: u16,
pub fSpecifyTransactionId: i32,
pub fUseTrxIdMessageIdMask: i32,
pub TransactionId: u32,
pub fSpecifyModuleVersion: i32,
pub ModuleVersion: u8,
pub fSpecifyBlockNumber: i32,
pub BlockNumber: u16,
pub fGetModuleCall: i32,
pub NumberOfBlocksInModule: u16,
}import "golang.org/x/sys/windows"
type DSMCC_FILTER_OPTIONS struct {
fSpecifyProtocol int32
Protocol byte
fSpecifyType int32
Type byte
fSpecifyMessageId int32
MessageId uint16
fSpecifyTransactionId int32
fUseTrxIdMessageIdMask int32
TransactionId uint32
fSpecifyModuleVersion int32
ModuleVersion byte
fSpecifyBlockNumber int32
BlockNumber uint16
fGetModuleCall int32
NumberOfBlocksInModule uint16
}type
DSMCC_FILTER_OPTIONS = packed record
fSpecifyProtocol: BOOL;
Protocol: Byte;
fSpecifyType: BOOL;
Type: Byte;
fSpecifyMessageId: BOOL;
MessageId: Word;
fSpecifyTransactionId: BOOL;
fUseTrxIdMessageIdMask: BOOL;
TransactionId: DWORD;
fSpecifyModuleVersion: BOOL;
ModuleVersion: Byte;
fSpecifyBlockNumber: BOOL;
BlockNumber: Word;
fGetModuleCall: BOOL;
NumberOfBlocksInModule: Word;
end;const DSMCC_FILTER_OPTIONS = extern struct {
fSpecifyProtocol: i32,
Protocol: u8,
fSpecifyType: i32,
Type: u8,
fSpecifyMessageId: i32,
MessageId: u16,
fSpecifyTransactionId: i32,
fUseTrxIdMessageIdMask: i32,
TransactionId: u32,
fSpecifyModuleVersion: i32,
ModuleVersion: u8,
fSpecifyBlockNumber: i32,
BlockNumber: u16,
fGetModuleCall: i32,
NumberOfBlocksInModule: u16,
};type
DSMCC_FILTER_OPTIONS {.packed.} = object
fSpecifyProtocol: int32
Protocol: uint8
fSpecifyType: int32
Type: uint8
fSpecifyMessageId: int32
MessageId: uint16
fSpecifyTransactionId: int32
fUseTrxIdMessageIdMask: int32
TransactionId: uint32
fSpecifyModuleVersion: int32
ModuleVersion: uint8
fSpecifyBlockNumber: int32
BlockNumber: uint16
fGetModuleCall: int32
NumberOfBlocksInModule: uint16align(1)
struct DSMCC_FILTER_OPTIONS
{
int fSpecifyProtocol;
ubyte Protocol;
int fSpecifyType;
ubyte Type;
int fSpecifyMessageId;
ushort MessageId;
int fSpecifyTransactionId;
int fUseTrxIdMessageIdMask;
uint TransactionId;
int fSpecifyModuleVersion;
ubyte ModuleVersion;
int fSpecifyBlockNumber;
ushort BlockNumber;
int fGetModuleCall;
ushort NumberOfBlocksInModule;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DSMCC_FILTER_OPTIONS サイズ: 45 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 45 / 4 切り上げ)
; fSpecifyProtocol : BOOL (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Protocol : BYTE (+4, 1byte) poke st,4,値 / 値 = peek(st,4)
; fSpecifyType : BOOL (+5, 4byte) lpoke st,5,値 / 値 = lpeek(st,5)
; Type : BYTE (+9, 1byte) poke st,9,値 / 値 = peek(st,9)
; fSpecifyMessageId : BOOL (+10, 4byte) lpoke st,10,値 / 値 = lpeek(st,10)
; MessageId : WORD (+14, 2byte) wpoke st,14,値 / 値 = wpeek(st,14)
; fSpecifyTransactionId : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; fUseTrxIdMessageIdMask : BOOL (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; TransactionId : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; fSpecifyModuleVersion : BOOL (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ModuleVersion : BYTE (+32, 1byte) poke st,32,値 / 値 = peek(st,32)
; fSpecifyBlockNumber : BOOL (+33, 4byte) lpoke st,33,値 / 値 = lpeek(st,33)
; BlockNumber : WORD (+37, 2byte) wpoke st,37,値 / 値 = wpeek(st,37)
; fGetModuleCall : BOOL (+39, 4byte) lpoke st,39,値 / 値 = lpeek(st,39)
; NumberOfBlocksInModule : WORD (+43, 2byte) wpoke st,43,値 / 値 = wpeek(st,43)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DSMCC_FILTER_OPTIONS, pack=1
#field bool fSpecifyProtocol
#field byte Protocol
#field bool fSpecifyType
#field byte Type
#field bool fSpecifyMessageId
#field short MessageId
#field bool fSpecifyTransactionId
#field bool fUseTrxIdMessageIdMask
#field int TransactionId
#field bool fSpecifyModuleVersion
#field byte ModuleVersion
#field bool fSpecifyBlockNumber
#field short BlockNumber
#field bool fGetModuleCall
#field short NumberOfBlocksInModule
#endstruct
stdim st, DSMCC_FILTER_OPTIONS ; NSTRUCT 変数を確保
st->fSpecifyProtocol = 100
mes "fSpecifyProtocol=" + st->fSpecifyProtocol