ホーム › Media.KernelStreaming › KS_FRAMING_RANGE
KS_FRAMING_RANGE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| MinFrameSize | DWORD | 4 | +0 | +0 | フレームの最小バイトサイズを示す。 |
| MaxFrameSize | DWORD | 4 | +4 | +4 | フレームの最大バイトサイズを示す。 |
| Stepping | DWORD | 4 | +8 | +8 | フレームサイズの刻み幅(増分)を示す。 |
各言語での定義
#include <windows.h>
// KS_FRAMING_RANGE (x64 12 / x86 12 バイト)
typedef struct KS_FRAMING_RANGE {
DWORD MinFrameSize;
DWORD MaxFrameSize;
DWORD Stepping;
} KS_FRAMING_RANGE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KS_FRAMING_RANGE
{
public uint MinFrameSize;
public uint MaxFrameSize;
public uint Stepping;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KS_FRAMING_RANGE
Public MinFrameSize As UInteger
Public MaxFrameSize As UInteger
Public Stepping As UInteger
End Structureimport ctypes
from ctypes import wintypes
class KS_FRAMING_RANGE(ctypes.Structure):
_fields_ = [
("MinFrameSize", wintypes.DWORD),
("MaxFrameSize", wintypes.DWORD),
("Stepping", wintypes.DWORD),
]#[repr(C)]
pub struct KS_FRAMING_RANGE {
pub MinFrameSize: u32,
pub MaxFrameSize: u32,
pub Stepping: u32,
}import "golang.org/x/sys/windows"
type KS_FRAMING_RANGE struct {
MinFrameSize uint32
MaxFrameSize uint32
Stepping uint32
}type
KS_FRAMING_RANGE = record
MinFrameSize: DWORD;
MaxFrameSize: DWORD;
Stepping: DWORD;
end;const KS_FRAMING_RANGE = extern struct {
MinFrameSize: u32,
MaxFrameSize: u32,
Stepping: u32,
};type
KS_FRAMING_RANGE {.bycopy.} = object
MinFrameSize: uint32
MaxFrameSize: uint32
Stepping: uint32struct KS_FRAMING_RANGE
{
uint MinFrameSize;
uint MaxFrameSize;
uint Stepping;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KS_FRAMING_RANGE サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; MinFrameSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; MaxFrameSize : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Stepping : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KS_FRAMING_RANGE
#field int MinFrameSize
#field int MaxFrameSize
#field int Stepping
#endstruct
stdim st, KS_FRAMING_RANGE ; NSTRUCT 変数を確保
st->MinFrameSize = 100
mes "MinFrameSize=" + st->MinFrameSize