ホーム › Media.KernelStreaming › ALLOCATOR_PROPERTIES_EX
ALLOCATOR_PROPERTIES_EX
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cBuffers | INT | 4 | +0 | +0 | 確保するバッファ数。アロケータが用意するバッファ個数を指定する。 |
| cbBuffer | INT | 4 | +4 | +4 | 各バッファのサイズ(バイト単位)。データ格納領域の大きさを表す。 |
| cbAlign | INT | 4 | +8 | +8 | バッファ先頭のアライメント要件(バイト単位)。メモリ整列境界を指定する。 |
| cbPrefix | INT | 4 | +12 | +12 | 各バッファ前方に確保するプレフィックス領域のサイズ(バイト単位)。 |
| MemoryType | GUID | 16 | +16 | +16 | メモリ種別を示すGUID。物理/システムメモリ等の割り当て元を識別する。 |
| BusType | GUID | 16 | +32 | +32 | バス種別を示すGUID。データ転送に使うバスの種類を識別する。 |
| State | PIPE_STATE | 4 | +48 | +48 | パイプの現在状態を示すPIPE_STATE列挙値。 |
| Input | PIPE_TERMINATION | 56 | +52 | +52 | 入力側の終端情報を示すPIPE_TERMINATION。 |
| Output | PIPE_TERMINATION | 56 | +108 | +108 | 出力側の終端情報を示すPIPE_TERMINATION。 |
| Strategy | DWORD | 4 | +164 | +164 | バッファ割り当て戦略を示すフラグ。割り当て方法の選択肢をビットで指定する。 |
| Flags | DWORD | 4 | +168 | +168 | アロケータの動作を制御する追加フラグ群。 |
| Weight | DWORD | 4 | +172 | +172 | このアロケータの重み付け値。パイプ全体での優先度評価に用いる。 |
| LogicalMemoryType | KS_LogicalMemoryType | 4 | +176 | +176 | 論理メモリ種別を示すKS_LogicalMemoryType列挙値。 |
| AllocatorPlace | PIPE_ALLOCATOR_PLACE | 4 | +180 | +180 | アロケータの配置位置を示すPIPE_ALLOCATOR_PLACE列挙値。 |
| Dimensions | PIPE_DIMENSIONS | 36 | +184 | +184 | パイプ各ピンの寸法情報を示すPIPE_DIMENSIONS。 |
| PhysicalRange | KS_FRAMING_RANGE | 12 | +220 | +220 | 物理フレーミング範囲を示すKS_FRAMING_RANGE。 |
| PrevSegment | IKsAllocatorEx* | 8/4 | +232 | +232 | 前段セグメントのアロケータインターフェイスへのポインタ。先頭ではNULL可。 |
| CountNextSegments | DWORD | 4 | +240 | +236 | 後続セグメント数。NextSegments配列の要素数を示す。 |
| NextSegments | IKsAllocatorEx** | 8/4 | +248 | +240 | 後続セグメントのアロケータポインタ配列へのポインタ。 |
| InsideFactors | DWORD | 4 | +256 | +244 | 内部要因による制約を示す値。パイプ内部での寸法影響を表す。 |
| NumberPins | DWORD | 4 | +260 | +248 | このパイプに関与するピンの総数。 |
各言語での定義
#include <windows.h>
// KS_FRAMING_RANGE (x64 12 / x86 12 バイト)
typedef struct KS_FRAMING_RANGE {
DWORD MinFrameSize;
DWORD MaxFrameSize;
DWORD Stepping;
} KS_FRAMING_RANGE;
// KS_FRAMING_RANGE_WEIGHTED (x64 20 / x86 20 バイト)
typedef struct KS_FRAMING_RANGE_WEIGHTED {
KS_FRAMING_RANGE Range;
DWORD InPlaceWeight;
DWORD NotInPlaceWeight;
} KS_FRAMING_RANGE_WEIGHTED;
// KS_COMPRESSION (x64 12 / x86 12 バイト)
typedef struct KS_COMPRESSION {
DWORD RatioNumerator;
DWORD RatioDenominator;
DWORD RatioConstantMargin;
} KS_COMPRESSION;
// PIPE_TERMINATION (x64 56 / x86 56 バイト)
typedef struct PIPE_TERMINATION {
DWORD Flags;
DWORD OutsideFactors;
DWORD Weigth;
KS_FRAMING_RANGE PhysicalRange;
KS_FRAMING_RANGE_WEIGHTED OptimalRange;
KS_COMPRESSION Compression;
} PIPE_TERMINATION;
// PIPE_DIMENSIONS (x64 36 / x86 36 バイト)
typedef struct PIPE_DIMENSIONS {
KS_COMPRESSION AllocatorPin;
KS_COMPRESSION MaxExpansionPin;
KS_COMPRESSION EndPin;
} PIPE_DIMENSIONS;
// ALLOCATOR_PROPERTIES_EX (x64 264 / x86 252 バイト)
typedef struct ALLOCATOR_PROPERTIES_EX {
INT cBuffers;
INT cbBuffer;
INT cbAlign;
INT cbPrefix;
GUID MemoryType;
GUID BusType;
PIPE_STATE State;
PIPE_TERMINATION Input;
PIPE_TERMINATION Output;
DWORD Strategy;
DWORD Flags;
DWORD Weight;
KS_LogicalMemoryType LogicalMemoryType;
PIPE_ALLOCATOR_PLACE AllocatorPlace;
PIPE_DIMENSIONS Dimensions;
KS_FRAMING_RANGE PhysicalRange;
IKsAllocatorEx* PrevSegment;
DWORD CountNextSegments;
IKsAllocatorEx** NextSegments;
DWORD InsideFactors;
DWORD NumberPins;
} ALLOCATOR_PROPERTIES_EX;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;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KS_FRAMING_RANGE_WEIGHTED
{
public KS_FRAMING_RANGE Range;
public uint InPlaceWeight;
public uint NotInPlaceWeight;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KS_COMPRESSION
{
public uint RatioNumerator;
public uint RatioDenominator;
public uint RatioConstantMargin;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PIPE_TERMINATION
{
public uint Flags;
public uint OutsideFactors;
public uint Weigth;
public KS_FRAMING_RANGE PhysicalRange;
public KS_FRAMING_RANGE_WEIGHTED OptimalRange;
public KS_COMPRESSION Compression;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PIPE_DIMENSIONS
{
public KS_COMPRESSION AllocatorPin;
public KS_COMPRESSION MaxExpansionPin;
public KS_COMPRESSION EndPin;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ALLOCATOR_PROPERTIES_EX
{
public int cBuffers;
public int cbBuffer;
public int cbAlign;
public int cbPrefix;
public Guid MemoryType;
public Guid BusType;
public int State;
public PIPE_TERMINATION Input;
public PIPE_TERMINATION Output;
public uint Strategy;
public uint Flags;
public uint Weight;
public int LogicalMemoryType;
public int AllocatorPlace;
public PIPE_DIMENSIONS Dimensions;
public KS_FRAMING_RANGE PhysicalRange;
public IntPtr PrevSegment;
public uint CountNextSegments;
public IntPtr NextSegments;
public uint InsideFactors;
public uint NumberPins;
}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 Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KS_FRAMING_RANGE_WEIGHTED
Public Range As KS_FRAMING_RANGE
Public InPlaceWeight As UInteger
Public NotInPlaceWeight As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KS_COMPRESSION
Public RatioNumerator As UInteger
Public RatioDenominator As UInteger
Public RatioConstantMargin As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PIPE_TERMINATION
Public Flags As UInteger
Public OutsideFactors As UInteger
Public Weigth As UInteger
Public PhysicalRange As KS_FRAMING_RANGE
Public OptimalRange As KS_FRAMING_RANGE_WEIGHTED
Public Compression As KS_COMPRESSION
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PIPE_DIMENSIONS
Public AllocatorPin As KS_COMPRESSION
Public MaxExpansionPin As KS_COMPRESSION
Public EndPin As KS_COMPRESSION
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ALLOCATOR_PROPERTIES_EX
Public cBuffers As Integer
Public cbBuffer As Integer
Public cbAlign As Integer
Public cbPrefix As Integer
Public MemoryType As Guid
Public BusType As Guid
Public State As Integer
Public Input As PIPE_TERMINATION
Public Output As PIPE_TERMINATION
Public Strategy As UInteger
Public Flags As UInteger
Public Weight As UInteger
Public LogicalMemoryType As Integer
Public AllocatorPlace As Integer
Public Dimensions As PIPE_DIMENSIONS
Public PhysicalRange As KS_FRAMING_RANGE
Public PrevSegment As IntPtr
Public CountNextSegments As UInteger
Public NextSegments As IntPtr
Public InsideFactors As UInteger
Public NumberPins 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),
]
class KS_FRAMING_RANGE_WEIGHTED(ctypes.Structure):
_fields_ = [
("Range", KS_FRAMING_RANGE),
("InPlaceWeight", wintypes.DWORD),
("NotInPlaceWeight", wintypes.DWORD),
]
class KS_COMPRESSION(ctypes.Structure):
_fields_ = [
("RatioNumerator", wintypes.DWORD),
("RatioDenominator", wintypes.DWORD),
("RatioConstantMargin", wintypes.DWORD),
]
class PIPE_TERMINATION(ctypes.Structure):
_fields_ = [
("Flags", wintypes.DWORD),
("OutsideFactors", wintypes.DWORD),
("Weigth", wintypes.DWORD),
("PhysicalRange", KS_FRAMING_RANGE),
("OptimalRange", KS_FRAMING_RANGE_WEIGHTED),
("Compression", KS_COMPRESSION),
]
class PIPE_DIMENSIONS(ctypes.Structure):
_fields_ = [
("AllocatorPin", KS_COMPRESSION),
("MaxExpansionPin", KS_COMPRESSION),
("EndPin", KS_COMPRESSION),
]
class ALLOCATOR_PROPERTIES_EX(ctypes.Structure):
_fields_ = [
("cBuffers", ctypes.c_int),
("cbBuffer", ctypes.c_int),
("cbAlign", ctypes.c_int),
("cbPrefix", ctypes.c_int),
("MemoryType", GUID),
("BusType", GUID),
("State", ctypes.c_int),
("Input", PIPE_TERMINATION),
("Output", PIPE_TERMINATION),
("Strategy", wintypes.DWORD),
("Flags", wintypes.DWORD),
("Weight", wintypes.DWORD),
("LogicalMemoryType", ctypes.c_int),
("AllocatorPlace", ctypes.c_int),
("Dimensions", PIPE_DIMENSIONS),
("PhysicalRange", KS_FRAMING_RANGE),
("PrevSegment", ctypes.c_void_p),
("CountNextSegments", wintypes.DWORD),
("NextSegments", ctypes.c_void_p),
("InsideFactors", wintypes.DWORD),
("NumberPins", wintypes.DWORD),
]#[repr(C)]
pub struct KS_FRAMING_RANGE {
pub MinFrameSize: u32,
pub MaxFrameSize: u32,
pub Stepping: u32,
}
#[repr(C)]
pub struct KS_FRAMING_RANGE_WEIGHTED {
pub Range: KS_FRAMING_RANGE,
pub InPlaceWeight: u32,
pub NotInPlaceWeight: u32,
}
#[repr(C)]
pub struct KS_COMPRESSION {
pub RatioNumerator: u32,
pub RatioDenominator: u32,
pub RatioConstantMargin: u32,
}
#[repr(C)]
pub struct PIPE_TERMINATION {
pub Flags: u32,
pub OutsideFactors: u32,
pub Weigth: u32,
pub PhysicalRange: KS_FRAMING_RANGE,
pub OptimalRange: KS_FRAMING_RANGE_WEIGHTED,
pub Compression: KS_COMPRESSION,
}
#[repr(C)]
pub struct PIPE_DIMENSIONS {
pub AllocatorPin: KS_COMPRESSION,
pub MaxExpansionPin: KS_COMPRESSION,
pub EndPin: KS_COMPRESSION,
}
#[repr(C)]
pub struct ALLOCATOR_PROPERTIES_EX {
pub cBuffers: i32,
pub cbBuffer: i32,
pub cbAlign: i32,
pub cbPrefix: i32,
pub MemoryType: GUID,
pub BusType: GUID,
pub State: i32,
pub Input: PIPE_TERMINATION,
pub Output: PIPE_TERMINATION,
pub Strategy: u32,
pub Flags: u32,
pub Weight: u32,
pub LogicalMemoryType: i32,
pub AllocatorPlace: i32,
pub Dimensions: PIPE_DIMENSIONS,
pub PhysicalRange: KS_FRAMING_RANGE,
pub PrevSegment: *mut core::ffi::c_void,
pub CountNextSegments: u32,
pub NextSegments: *mut core::ffi::c_void,
pub InsideFactors: u32,
pub NumberPins: u32,
}import "golang.org/x/sys/windows"
type KS_FRAMING_RANGE struct {
MinFrameSize uint32
MaxFrameSize uint32
Stepping uint32
}
type KS_FRAMING_RANGE_WEIGHTED struct {
Range KS_FRAMING_RANGE
InPlaceWeight uint32
NotInPlaceWeight uint32
}
type KS_COMPRESSION struct {
RatioNumerator uint32
RatioDenominator uint32
RatioConstantMargin uint32
}
type PIPE_TERMINATION struct {
Flags uint32
OutsideFactors uint32
Weigth uint32
PhysicalRange KS_FRAMING_RANGE
OptimalRange KS_FRAMING_RANGE_WEIGHTED
Compression KS_COMPRESSION
}
type PIPE_DIMENSIONS struct {
AllocatorPin KS_COMPRESSION
MaxExpansionPin KS_COMPRESSION
EndPin KS_COMPRESSION
}
type ALLOCATOR_PROPERTIES_EX struct {
cBuffers int32
cbBuffer int32
cbAlign int32
cbPrefix int32
MemoryType windows.GUID
BusType windows.GUID
State int32
Input PIPE_TERMINATION
Output PIPE_TERMINATION
Strategy uint32
Flags uint32
Weight uint32
LogicalMemoryType int32
AllocatorPlace int32
Dimensions PIPE_DIMENSIONS
PhysicalRange KS_FRAMING_RANGE
PrevSegment uintptr
CountNextSegments uint32
NextSegments uintptr
InsideFactors uint32
NumberPins uint32
}type
KS_FRAMING_RANGE = record
MinFrameSize: DWORD;
MaxFrameSize: DWORD;
Stepping: DWORD;
end;
KS_FRAMING_RANGE_WEIGHTED = record
Range: KS_FRAMING_RANGE;
InPlaceWeight: DWORD;
NotInPlaceWeight: DWORD;
end;
KS_COMPRESSION = record
RatioNumerator: DWORD;
RatioDenominator: DWORD;
RatioConstantMargin: DWORD;
end;
PIPE_TERMINATION = record
Flags: DWORD;
OutsideFactors: DWORD;
Weigth: DWORD;
PhysicalRange: KS_FRAMING_RANGE;
OptimalRange: KS_FRAMING_RANGE_WEIGHTED;
Compression: KS_COMPRESSION;
end;
PIPE_DIMENSIONS = record
AllocatorPin: KS_COMPRESSION;
MaxExpansionPin: KS_COMPRESSION;
EndPin: KS_COMPRESSION;
end;
ALLOCATOR_PROPERTIES_EX = record
cBuffers: Integer;
cbBuffer: Integer;
cbAlign: Integer;
cbPrefix: Integer;
MemoryType: TGUID;
BusType: TGUID;
State: Integer;
Input: PIPE_TERMINATION;
Output: PIPE_TERMINATION;
Strategy: DWORD;
Flags: DWORD;
Weight: DWORD;
LogicalMemoryType: Integer;
AllocatorPlace: Integer;
Dimensions: PIPE_DIMENSIONS;
PhysicalRange: KS_FRAMING_RANGE;
PrevSegment: Pointer;
CountNextSegments: DWORD;
NextSegments: Pointer;
InsideFactors: DWORD;
NumberPins: DWORD;
end;const KS_FRAMING_RANGE = extern struct {
MinFrameSize: u32,
MaxFrameSize: u32,
Stepping: u32,
};
const KS_FRAMING_RANGE_WEIGHTED = extern struct {
Range: KS_FRAMING_RANGE,
InPlaceWeight: u32,
NotInPlaceWeight: u32,
};
const KS_COMPRESSION = extern struct {
RatioNumerator: u32,
RatioDenominator: u32,
RatioConstantMargin: u32,
};
const PIPE_TERMINATION = extern struct {
Flags: u32,
OutsideFactors: u32,
Weigth: u32,
PhysicalRange: KS_FRAMING_RANGE,
OptimalRange: KS_FRAMING_RANGE_WEIGHTED,
Compression: KS_COMPRESSION,
};
const PIPE_DIMENSIONS = extern struct {
AllocatorPin: KS_COMPRESSION,
MaxExpansionPin: KS_COMPRESSION,
EndPin: KS_COMPRESSION,
};
const ALLOCATOR_PROPERTIES_EX = extern struct {
cBuffers: i32,
cbBuffer: i32,
cbAlign: i32,
cbPrefix: i32,
MemoryType: GUID,
BusType: GUID,
State: i32,
Input: PIPE_TERMINATION,
Output: PIPE_TERMINATION,
Strategy: u32,
Flags: u32,
Weight: u32,
LogicalMemoryType: i32,
AllocatorPlace: i32,
Dimensions: PIPE_DIMENSIONS,
PhysicalRange: KS_FRAMING_RANGE,
PrevSegment: ?*anyopaque,
CountNextSegments: u32,
NextSegments: ?*anyopaque,
InsideFactors: u32,
NumberPins: u32,
};type
KS_FRAMING_RANGE {.bycopy.} = object
MinFrameSize: uint32
MaxFrameSize: uint32
Stepping: uint32
KS_FRAMING_RANGE_WEIGHTED {.bycopy.} = object
Range: KS_FRAMING_RANGE
InPlaceWeight: uint32
NotInPlaceWeight: uint32
KS_COMPRESSION {.bycopy.} = object
RatioNumerator: uint32
RatioDenominator: uint32
RatioConstantMargin: uint32
PIPE_TERMINATION {.bycopy.} = object
Flags: uint32
OutsideFactors: uint32
Weigth: uint32
PhysicalRange: KS_FRAMING_RANGE
OptimalRange: KS_FRAMING_RANGE_WEIGHTED
Compression: KS_COMPRESSION
PIPE_DIMENSIONS {.bycopy.} = object
AllocatorPin: KS_COMPRESSION
MaxExpansionPin: KS_COMPRESSION
EndPin: KS_COMPRESSION
ALLOCATOR_PROPERTIES_EX {.bycopy.} = object
cBuffers: int32
cbBuffer: int32
cbAlign: int32
cbPrefix: int32
MemoryType: GUID
BusType: GUID
State: int32
Input: PIPE_TERMINATION
Output: PIPE_TERMINATION
Strategy: uint32
Flags: uint32
Weight: uint32
LogicalMemoryType: int32
AllocatorPlace: int32
Dimensions: PIPE_DIMENSIONS
PhysicalRange: KS_FRAMING_RANGE
PrevSegment: pointer
CountNextSegments: uint32
NextSegments: pointer
InsideFactors: uint32
NumberPins: uint32struct KS_FRAMING_RANGE
{
uint MinFrameSize;
uint MaxFrameSize;
uint Stepping;
}
struct KS_FRAMING_RANGE_WEIGHTED
{
KS_FRAMING_RANGE Range;
uint InPlaceWeight;
uint NotInPlaceWeight;
}
struct KS_COMPRESSION
{
uint RatioNumerator;
uint RatioDenominator;
uint RatioConstantMargin;
}
struct PIPE_TERMINATION
{
uint Flags;
uint OutsideFactors;
uint Weigth;
KS_FRAMING_RANGE PhysicalRange;
KS_FRAMING_RANGE_WEIGHTED OptimalRange;
KS_COMPRESSION Compression;
}
struct PIPE_DIMENSIONS
{
KS_COMPRESSION AllocatorPin;
KS_COMPRESSION MaxExpansionPin;
KS_COMPRESSION EndPin;
}
struct ALLOCATOR_PROPERTIES_EX
{
int cBuffers;
int cbBuffer;
int cbAlign;
int cbPrefix;
GUID MemoryType;
GUID BusType;
int State;
PIPE_TERMINATION Input;
PIPE_TERMINATION Output;
uint Strategy;
uint Flags;
uint Weight;
int LogicalMemoryType;
int AllocatorPlace;
PIPE_DIMENSIONS Dimensions;
KS_FRAMING_RANGE PhysicalRange;
void* PrevSegment;
uint CountNextSegments;
void* NextSegments;
uint InsideFactors;
uint NumberPins;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; ALLOCATOR_PROPERTIES_EX サイズ: 252 バイト(x86)
dim st, 63 ; 4byte整数×63(構造体サイズ 252 / 4 切り上げ)
; cBuffers : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; cbBuffer : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; cbAlign : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cbPrefix : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; MemoryType : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; BusType : GUID (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; State : PIPE_STATE (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; Input : PIPE_TERMINATION (+52, 56byte) varptr(st)+52 を基点に操作(56byte:入れ子/配列)
; Output : PIPE_TERMINATION (+108, 56byte) varptr(st)+108 を基点に操作(56byte:入れ子/配列)
; Strategy : DWORD (+164, 4byte) st.41 = 値 / 値 = st.41 (lpoke/lpeek も可)
; Flags : DWORD (+168, 4byte) st.42 = 値 / 値 = st.42 (lpoke/lpeek も可)
; Weight : DWORD (+172, 4byte) st.43 = 値 / 値 = st.43 (lpoke/lpeek も可)
; LogicalMemoryType : KS_LogicalMemoryType (+176, 4byte) st.44 = 値 / 値 = st.44 (lpoke/lpeek も可)
; AllocatorPlace : PIPE_ALLOCATOR_PLACE (+180, 4byte) st.45 = 値 / 値 = st.45 (lpoke/lpeek も可)
; Dimensions : PIPE_DIMENSIONS (+184, 36byte) varptr(st)+184 を基点に操作(36byte:入れ子/配列)
; PhysicalRange : KS_FRAMING_RANGE (+220, 12byte) varptr(st)+220 を基点に操作(12byte:入れ子/配列)
; PrevSegment : IKsAllocatorEx* (+232, 4byte) st.58 = 値 / 値 = st.58 (lpoke/lpeek も可)
; CountNextSegments : DWORD (+236, 4byte) st.59 = 値 / 値 = st.59 (lpoke/lpeek も可)
; NextSegments : IKsAllocatorEx** (+240, 4byte) st.60 = 値 / 値 = st.60 (lpoke/lpeek も可)
; InsideFactors : DWORD (+244, 4byte) st.61 = 値 / 値 = st.61 (lpoke/lpeek も可)
; NumberPins : DWORD (+248, 4byte) st.62 = 値 / 値 = st.62 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ALLOCATOR_PROPERTIES_EX サイズ: 264 バイト(x64)
dim st, 66 ; 4byte整数×66(構造体サイズ 264 / 4 切り上げ)
; cBuffers : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; cbBuffer : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; cbAlign : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cbPrefix : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; MemoryType : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; BusType : GUID (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; State : PIPE_STATE (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; Input : PIPE_TERMINATION (+52, 56byte) varptr(st)+52 を基点に操作(56byte:入れ子/配列)
; Output : PIPE_TERMINATION (+108, 56byte) varptr(st)+108 を基点に操作(56byte:入れ子/配列)
; Strategy : DWORD (+164, 4byte) st.41 = 値 / 値 = st.41 (lpoke/lpeek も可)
; Flags : DWORD (+168, 4byte) st.42 = 値 / 値 = st.42 (lpoke/lpeek も可)
; Weight : DWORD (+172, 4byte) st.43 = 値 / 値 = st.43 (lpoke/lpeek も可)
; LogicalMemoryType : KS_LogicalMemoryType (+176, 4byte) st.44 = 値 / 値 = st.44 (lpoke/lpeek も可)
; AllocatorPlace : PIPE_ALLOCATOR_PLACE (+180, 4byte) st.45 = 値 / 値 = st.45 (lpoke/lpeek も可)
; Dimensions : PIPE_DIMENSIONS (+184, 36byte) varptr(st)+184 を基点に操作(36byte:入れ子/配列)
; PhysicalRange : KS_FRAMING_RANGE (+220, 12byte) varptr(st)+220 を基点に操作(12byte:入れ子/配列)
; PrevSegment : IKsAllocatorEx* (+232, 8byte) qpoke st,232,値 / qpeek(st,232) ※IronHSPのみ。3.7/3.8は lpoke st,232,下位 : lpoke st,236,上位
; CountNextSegments : DWORD (+240, 4byte) st.60 = 値 / 値 = st.60 (lpoke/lpeek も可)
; NextSegments : IKsAllocatorEx** (+248, 8byte) qpoke st,248,値 / qpeek(st,248) ※IronHSPのみ。3.7/3.8は lpoke st,248,下位 : lpoke st,252,上位
; InsideFactors : DWORD (+256, 4byte) st.64 = 値 / 値 = st.64 (lpoke/lpeek も可)
; NumberPins : DWORD (+260, 4byte) st.65 = 値 / 値 = st.65 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global KS_FRAMING_RANGE
#field int MinFrameSize
#field int MaxFrameSize
#field int Stepping
#endstruct
#defstruct global KS_FRAMING_RANGE_WEIGHTED
#field KS_FRAMING_RANGE Range
#field int InPlaceWeight
#field int NotInPlaceWeight
#endstruct
#defstruct global KS_COMPRESSION
#field int RatioNumerator
#field int RatioDenominator
#field int RatioConstantMargin
#endstruct
#defstruct global PIPE_TERMINATION
#field int Flags
#field int OutsideFactors
#field int Weigth
#field KS_FRAMING_RANGE PhysicalRange
#field KS_FRAMING_RANGE_WEIGHTED OptimalRange
#field KS_COMPRESSION Compression
#endstruct
#defstruct global PIPE_DIMENSIONS
#field KS_COMPRESSION AllocatorPin
#field KS_COMPRESSION MaxExpansionPin
#field KS_COMPRESSION EndPin
#endstruct
#defstruct global ALLOCATOR_PROPERTIES_EX
#field int cBuffers
#field int cbBuffer
#field int cbAlign
#field int cbPrefix
#field GUID MemoryType
#field GUID BusType
#field int State
#field PIPE_TERMINATION Input
#field PIPE_TERMINATION Output
#field int Strategy
#field int Flags
#field int Weight
#field int LogicalMemoryType
#field int AllocatorPlace
#field PIPE_DIMENSIONS Dimensions
#field KS_FRAMING_RANGE PhysicalRange
#field intptr PrevSegment
#field int CountNextSegments
#field intptr NextSegments
#field int InsideFactors
#field int NumberPins
#endstruct
stdim st, ALLOCATOR_PROPERTIES_EX ; NSTRUCT 変数を確保
st->cBuffers = 100
mes "cBuffers=" + st->cBuffers