ホーム › Media.KernelStreaming › KSPROPERTY_STEPPING_LONG
KSPROPERTY_STEPPING_LONG
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| SteppingDelta | DWORD | 4 | +0 | +0 | 値の刻み幅(増分)。32ビットプロパティの段階値を示す。 |
| Reserved | DWORD | 4 | +4 | +4 | 予約領域。将来拡張用で通常は0とする。 |
| Bounds | KSPROPERTY_BOUNDS_LONG | 8 | +8 | +8 | 値の下限/上限範囲(KSPROPERTY_BOUNDS_LONG)。許容範囲を示す。 |
各言語での定義
#include <windows.h>
// KSPROPERTY_BOUNDS_LONG (x64 8 / x86 8 バイト)
typedef struct KSPROPERTY_BOUNDS_LONG {
_Anonymous1_e__Struct Anonymous1;
_Anonymous2_e__Struct Anonymous2;
} KSPROPERTY_BOUNDS_LONG;
// KSPROPERTY_STEPPING_LONG (x64 16 / x86 16 バイト)
typedef struct KSPROPERTY_STEPPING_LONG {
DWORD SteppingDelta;
DWORD Reserved;
KSPROPERTY_BOUNDS_LONG Bounds;
} KSPROPERTY_STEPPING_LONG;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSPROPERTY_BOUNDS_LONG
{
public _Anonymous1_e__Struct Anonymous1;
public _Anonymous2_e__Struct Anonymous2;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSPROPERTY_STEPPING_LONG
{
public uint SteppingDelta;
public uint Reserved;
public KSPROPERTY_BOUNDS_LONG Bounds;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSPROPERTY_BOUNDS_LONG
Public Anonymous1 As _Anonymous1_e__Struct
Public Anonymous2 As _Anonymous2_e__Struct
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSPROPERTY_STEPPING_LONG
Public SteppingDelta As UInteger
Public Reserved As UInteger
Public Bounds As KSPROPERTY_BOUNDS_LONG
End Structureimport ctypes
from ctypes import wintypes
class KSPROPERTY_BOUNDS_LONG(ctypes.Structure):
_fields_ = [
("Anonymous1", _Anonymous1_e__Struct),
("Anonymous2", _Anonymous2_e__Struct),
]
class KSPROPERTY_STEPPING_LONG(ctypes.Structure):
_fields_ = [
("SteppingDelta", wintypes.DWORD),
("Reserved", wintypes.DWORD),
("Bounds", KSPROPERTY_BOUNDS_LONG),
]#[repr(C)]
pub struct KSPROPERTY_BOUNDS_LONG {
pub Anonymous1: _Anonymous1_e__Struct,
pub Anonymous2: _Anonymous2_e__Struct,
}
#[repr(C)]
pub struct KSPROPERTY_STEPPING_LONG {
pub SteppingDelta: u32,
pub Reserved: u32,
pub Bounds: KSPROPERTY_BOUNDS_LONG,
}import "golang.org/x/sys/windows"
type KSPROPERTY_BOUNDS_LONG struct {
Anonymous1 _Anonymous1_e__Struct
Anonymous2 _Anonymous2_e__Struct
}
type KSPROPERTY_STEPPING_LONG struct {
SteppingDelta uint32
Reserved uint32
Bounds KSPROPERTY_BOUNDS_LONG
}type
KSPROPERTY_BOUNDS_LONG = record
Anonymous1: _Anonymous1_e__Struct;
Anonymous2: _Anonymous2_e__Struct;
end;
KSPROPERTY_STEPPING_LONG = record
SteppingDelta: DWORD;
Reserved: DWORD;
Bounds: KSPROPERTY_BOUNDS_LONG;
end;const KSPROPERTY_BOUNDS_LONG = extern struct {
Anonymous1: _Anonymous1_e__Struct,
Anonymous2: _Anonymous2_e__Struct,
};
const KSPROPERTY_STEPPING_LONG = extern struct {
SteppingDelta: u32,
Reserved: u32,
Bounds: KSPROPERTY_BOUNDS_LONG,
};type
KSPROPERTY_BOUNDS_LONG {.bycopy.} = object
Anonymous1: _Anonymous1_e__Struct
Anonymous2: _Anonymous2_e__Struct
KSPROPERTY_STEPPING_LONG {.bycopy.} = object
SteppingDelta: uint32
Reserved: uint32
Bounds: KSPROPERTY_BOUNDS_LONGstruct KSPROPERTY_BOUNDS_LONG
{
_Anonymous1_e__Struct Anonymous1;
_Anonymous2_e__Struct Anonymous2;
}
struct KSPROPERTY_STEPPING_LONG
{
uint SteppingDelta;
uint Reserved;
KSPROPERTY_BOUNDS_LONG Bounds;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KSPROPERTY_STEPPING_LONG サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; SteppingDelta : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Reserved : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Bounds : KSPROPERTY_BOUNDS_LONG (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSPROPERTY_STEPPING_LONG
#field int SteppingDelta
#field int Reserved
#field byte Bounds 8
#endstruct
stdim st, KSPROPERTY_STEPPING_LONG ; NSTRUCT 変数を確保
st->SteppingDelta = 100
mes "SteppingDelta=" + st->SteppingDelta
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。