Win32 API 日本語リファレンス
ホームMedia.KernelStreaming › ALLOCATOR_PROPERTIES_EX

ALLOCATOR_PROPERTIES_EX

構造体
サイズx64: 264 バイト / x86: 252 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
cBuffersINT4+0+0確保するバッファ数。アロケータが用意するバッファ個数を指定する。
cbBufferINT4+4+4各バッファのサイズ(バイト単位)。データ格納領域の大きさを表す。
cbAlignINT4+8+8バッファ先頭のアライメント要件(バイト単位)。メモリ整列境界を指定する。
cbPrefixINT4+12+12各バッファ前方に確保するプレフィックス領域のサイズ(バイト単位)。
MemoryTypeGUID16+16+16メモリ種別を示すGUID。物理/システムメモリ等の割り当て元を識別する。
BusTypeGUID16+32+32バス種別を示すGUID。データ転送に使うバスの種類を識別する。
StatePIPE_STATE4+48+48パイプの現在状態を示すPIPE_STATE列挙値。
InputPIPE_TERMINATION56+52+52入力側の終端情報を示すPIPE_TERMINATION。
OutputPIPE_TERMINATION56+108+108出力側の終端情報を示すPIPE_TERMINATION。
StrategyDWORD4+164+164バッファ割り当て戦略を示すフラグ。割り当て方法の選択肢をビットで指定する。
FlagsDWORD4+168+168アロケータの動作を制御する追加フラグ群。
WeightDWORD4+172+172このアロケータの重み付け値。パイプ全体での優先度評価に用いる。
LogicalMemoryTypeKS_LogicalMemoryType4+176+176論理メモリ種別を示すKS_LogicalMemoryType列挙値。
AllocatorPlacePIPE_ALLOCATOR_PLACE4+180+180アロケータの配置位置を示すPIPE_ALLOCATOR_PLACE列挙値。
DimensionsPIPE_DIMENSIONS36+184+184パイプ各ピンの寸法情報を示すPIPE_DIMENSIONS。
PhysicalRangeKS_FRAMING_RANGE12+220+220物理フレーミング範囲を示すKS_FRAMING_RANGE。
PrevSegmentIKsAllocatorEx*8/4+232+232前段セグメントのアロケータインターフェイスへのポインタ。先頭ではNULL可。
CountNextSegmentsDWORD4+240+236後続セグメント数。NextSegments配列の要素数を示す。
NextSegmentsIKsAllocatorEx**8/4+248+240後続セグメントのアロケータポインタ配列へのポインタ。
InsideFactorsDWORD4+256+244内部要因による制約を示す値。パイプ内部での寸法影響を表す。
NumberPinsDWORD4+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 Structure
import 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: uint32
struct 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