ホーム › Graphics.DirectDraw › DDHAL_BLTDATA
DDHAL_BLTDATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| lpDD | DDRAWI_DIRECTDRAW_GBL* | 8/4 | +0 | +0 | 対象のグローバルDirectDrawオブジェクトへのポインタ。 |
| lpDDDestSurface | DDRAWI_DDRAWSURFACE_LCL* | 8/4 | +8 | +4 | 転送先サーフェスのローカルオブジェクトへのポインタ。 |
| rDest | RECTL | 16 | +16 | +8 | 転送先矩形(RECTL)を示す。 |
| lpDDSrcSurface | DDRAWI_DDRAWSURFACE_LCL* | 8/4 | +32 | +24 | 転送元サーフェスのローカルオブジェクトへのポインタ。NULL可。 |
| rSrc | RECTL | 16 | +40 | +28 | 転送元矩形(RECTL)を示す。 |
| dwFlags | DWORD | 4 | +56 | +44 | Bltの動作を制御するDDBLT_系フラグを示す。 |
| dwROPFlags | DWORD | 4 | +60 | +48 | 適用するROPフラグを示す。 |
| bltFX | DDBLTFX | 128/100 | +64 | +52 | Blt効果指定(DDBLTFX)を示す。 |
| ddRVal | HRESULT | 4 | +192 | +152 | Blt実行結果を示すHRESULT。 |
| Blt | LPDDHALSURFCB_BLT | 8/4 | +200 | +156 | 実際のBlt処理を行うコールバックへのポインタ。 |
| IsClipped | BOOL | 4 | +208 | +160 | クリッピング済みのBltかを示す真偽値。 |
| rOrigDest | RECTL | 16 | +212 | +164 | クリッピング前の元の転送先矩形(RECTL)を示す。 |
| rOrigSrc | RECTL | 16 | +228 | +180 | クリッピング前の元の転送元矩形(RECTL)を示す。 |
| dwRectCnt | DWORD | 4 | +244 | +196 | クリッピング後の分割矩形の数を示す。 |
| prDestRects | RECT* | 8/4 | +248 | +200 | クリッピング後の転送先矩形配列(RECT)へのポインタ。 |
各言語での定義
#include <windows.h>
// RECTL (x64 16 / x86 16 バイト)
typedef struct RECTL {
INT left;
INT top;
INT right;
INT bottom;
} RECTL;
// DDCOLORKEY (x64 8 / x86 8 バイト)
typedef struct DDCOLORKEY {
DWORD dwColorSpaceLowValue;
DWORD dwColorSpaceHighValue;
} DDCOLORKEY;
// DDBLTFX (x64 128 / x86 100 バイト)
typedef struct DDBLTFX {
DWORD dwSize;
DWORD dwDDFX;
DWORD dwROP;
DWORD dwDDROP;
DWORD dwRotationAngle;
DWORD dwZBufferOpCode;
DWORD dwZBufferLow;
DWORD dwZBufferHigh;
DWORD dwZBufferBaseDest;
DWORD dwZDestConstBitDepth;
_Anonymous1_e__Union Anonymous1;
DWORD dwZSrcConstBitDepth;
_Anonymous2_e__Union Anonymous2;
DWORD dwAlphaEdgeBlendBitDepth;
DWORD dwAlphaEdgeBlend;
DWORD dwReserved;
DWORD dwAlphaDestConstBitDepth;
_Anonymous3_e__Union Anonymous3;
DWORD dwAlphaSrcConstBitDepth;
_Anonymous4_e__Union Anonymous4;
_Anonymous5_e__Union Anonymous5;
DDCOLORKEY ddckDestColorkey;
DDCOLORKEY ddckSrcColorkey;
} DDBLTFX;
// DDHAL_BLTDATA (x64 256 / x86 204 バイト)
typedef struct DDHAL_BLTDATA {
DDRAWI_DIRECTDRAW_GBL* lpDD;
DDRAWI_DDRAWSURFACE_LCL* lpDDDestSurface;
RECTL rDest;
DDRAWI_DDRAWSURFACE_LCL* lpDDSrcSurface;
RECTL rSrc;
DWORD dwFlags;
DWORD dwROPFlags;
DDBLTFX bltFX;
HRESULT ddRVal;
LPDDHALSURFCB_BLT Blt;
BOOL IsClipped;
RECTL rOrigDest;
RECTL rOrigSrc;
DWORD dwRectCnt;
RECT* prDestRects;
} DDHAL_BLTDATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RECTL
{
public int left;
public int top;
public int right;
public int bottom;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDCOLORKEY
{
public uint dwColorSpaceLowValue;
public uint dwColorSpaceHighValue;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDBLTFX
{
public uint dwSize;
public uint dwDDFX;
public uint dwROP;
public uint dwDDROP;
public uint dwRotationAngle;
public uint dwZBufferOpCode;
public uint dwZBufferLow;
public uint dwZBufferHigh;
public uint dwZBufferBaseDest;
public uint dwZDestConstBitDepth;
public _Anonymous1_e__Union Anonymous1;
public uint dwZSrcConstBitDepth;
public _Anonymous2_e__Union Anonymous2;
public uint dwAlphaEdgeBlendBitDepth;
public uint dwAlphaEdgeBlend;
public uint dwReserved;
public uint dwAlphaDestConstBitDepth;
public _Anonymous3_e__Union Anonymous3;
public uint dwAlphaSrcConstBitDepth;
public _Anonymous4_e__Union Anonymous4;
public _Anonymous5_e__Union Anonymous5;
public DDCOLORKEY ddckDestColorkey;
public DDCOLORKEY ddckSrcColorkey;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDHAL_BLTDATA
{
public IntPtr lpDD;
public IntPtr lpDDDestSurface;
public RECTL rDest;
public IntPtr lpDDSrcSurface;
public RECTL rSrc;
public uint dwFlags;
public uint dwROPFlags;
public DDBLTFX bltFX;
public int ddRVal;
public IntPtr Blt;
[MarshalAs(UnmanagedType.Bool)] public bool IsClipped;
public RECTL rOrigDest;
public RECTL rOrigSrc;
public uint dwRectCnt;
public IntPtr prDestRects;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RECTL
Public left As Integer
Public top As Integer
Public right As Integer
Public bottom As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDCOLORKEY
Public dwColorSpaceLowValue As UInteger
Public dwColorSpaceHighValue As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDBLTFX
Public dwSize As UInteger
Public dwDDFX As UInteger
Public dwROP As UInteger
Public dwDDROP As UInteger
Public dwRotationAngle As UInteger
Public dwZBufferOpCode As UInteger
Public dwZBufferLow As UInteger
Public dwZBufferHigh As UInteger
Public dwZBufferBaseDest As UInteger
Public dwZDestConstBitDepth As UInteger
Public Anonymous1 As _Anonymous1_e__Union
Public dwZSrcConstBitDepth As UInteger
Public Anonymous2 As _Anonymous2_e__Union
Public dwAlphaEdgeBlendBitDepth As UInteger
Public dwAlphaEdgeBlend As UInteger
Public dwReserved As UInteger
Public dwAlphaDestConstBitDepth As UInteger
Public Anonymous3 As _Anonymous3_e__Union
Public dwAlphaSrcConstBitDepth As UInteger
Public Anonymous4 As _Anonymous4_e__Union
Public Anonymous5 As _Anonymous5_e__Union
Public ddckDestColorkey As DDCOLORKEY
Public ddckSrcColorkey As DDCOLORKEY
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDHAL_BLTDATA
Public lpDD As IntPtr
Public lpDDDestSurface As IntPtr
Public rDest As RECTL
Public lpDDSrcSurface As IntPtr
Public rSrc As RECTL
Public dwFlags As UInteger
Public dwROPFlags As UInteger
Public bltFX As DDBLTFX
Public ddRVal As Integer
Public Blt As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public IsClipped As Boolean
Public rOrigDest As RECTL
Public rOrigSrc As RECTL
Public dwRectCnt As UInteger
Public prDestRects As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class RECTL(ctypes.Structure):
_fields_ = [
("left", ctypes.c_int),
("top", ctypes.c_int),
("right", ctypes.c_int),
("bottom", ctypes.c_int),
]
class DDCOLORKEY(ctypes.Structure):
_fields_ = [
("dwColorSpaceLowValue", wintypes.DWORD),
("dwColorSpaceHighValue", wintypes.DWORD),
]
class DDBLTFX(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("dwDDFX", wintypes.DWORD),
("dwROP", wintypes.DWORD),
("dwDDROP", wintypes.DWORD),
("dwRotationAngle", wintypes.DWORD),
("dwZBufferOpCode", wintypes.DWORD),
("dwZBufferLow", wintypes.DWORD),
("dwZBufferHigh", wintypes.DWORD),
("dwZBufferBaseDest", wintypes.DWORD),
("dwZDestConstBitDepth", wintypes.DWORD),
("Anonymous1", _Anonymous1_e__Union),
("dwZSrcConstBitDepth", wintypes.DWORD),
("Anonymous2", _Anonymous2_e__Union),
("dwAlphaEdgeBlendBitDepth", wintypes.DWORD),
("dwAlphaEdgeBlend", wintypes.DWORD),
("dwReserved", wintypes.DWORD),
("dwAlphaDestConstBitDepth", wintypes.DWORD),
("Anonymous3", _Anonymous3_e__Union),
("dwAlphaSrcConstBitDepth", wintypes.DWORD),
("Anonymous4", _Anonymous4_e__Union),
("Anonymous5", _Anonymous5_e__Union),
("ddckDestColorkey", DDCOLORKEY),
("ddckSrcColorkey", DDCOLORKEY),
]
class DDHAL_BLTDATA(ctypes.Structure):
_fields_ = [
("lpDD", ctypes.c_void_p),
("lpDDDestSurface", ctypes.c_void_p),
("rDest", RECTL),
("lpDDSrcSurface", ctypes.c_void_p),
("rSrc", RECTL),
("dwFlags", wintypes.DWORD),
("dwROPFlags", wintypes.DWORD),
("bltFX", DDBLTFX),
("ddRVal", ctypes.c_int),
("Blt", ctypes.c_void_p),
("IsClipped", wintypes.BOOL),
("rOrigDest", RECTL),
("rOrigSrc", RECTL),
("dwRectCnt", wintypes.DWORD),
("prDestRects", ctypes.c_void_p),
]#[repr(C)]
pub struct RECTL {
pub left: i32,
pub top: i32,
pub right: i32,
pub bottom: i32,
}
#[repr(C)]
pub struct DDCOLORKEY {
pub dwColorSpaceLowValue: u32,
pub dwColorSpaceHighValue: u32,
}
#[repr(C)]
pub struct DDBLTFX {
pub dwSize: u32,
pub dwDDFX: u32,
pub dwROP: u32,
pub dwDDROP: u32,
pub dwRotationAngle: u32,
pub dwZBufferOpCode: u32,
pub dwZBufferLow: u32,
pub dwZBufferHigh: u32,
pub dwZBufferBaseDest: u32,
pub dwZDestConstBitDepth: u32,
pub Anonymous1: _Anonymous1_e__Union,
pub dwZSrcConstBitDepth: u32,
pub Anonymous2: _Anonymous2_e__Union,
pub dwAlphaEdgeBlendBitDepth: u32,
pub dwAlphaEdgeBlend: u32,
pub dwReserved: u32,
pub dwAlphaDestConstBitDepth: u32,
pub Anonymous3: _Anonymous3_e__Union,
pub dwAlphaSrcConstBitDepth: u32,
pub Anonymous4: _Anonymous4_e__Union,
pub Anonymous5: _Anonymous5_e__Union,
pub ddckDestColorkey: DDCOLORKEY,
pub ddckSrcColorkey: DDCOLORKEY,
}
#[repr(C)]
pub struct DDHAL_BLTDATA {
pub lpDD: *mut core::ffi::c_void,
pub lpDDDestSurface: *mut core::ffi::c_void,
pub rDest: RECTL,
pub lpDDSrcSurface: *mut core::ffi::c_void,
pub rSrc: RECTL,
pub dwFlags: u32,
pub dwROPFlags: u32,
pub bltFX: DDBLTFX,
pub ddRVal: i32,
pub Blt: *mut core::ffi::c_void,
pub IsClipped: i32,
pub rOrigDest: RECTL,
pub rOrigSrc: RECTL,
pub dwRectCnt: u32,
pub prDestRects: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type RECTL struct {
left int32
top int32
right int32
bottom int32
}
type DDCOLORKEY struct {
dwColorSpaceLowValue uint32
dwColorSpaceHighValue uint32
}
type DDBLTFX struct {
dwSize uint32
dwDDFX uint32
dwROP uint32
dwDDROP uint32
dwRotationAngle uint32
dwZBufferOpCode uint32
dwZBufferLow uint32
dwZBufferHigh uint32
dwZBufferBaseDest uint32
dwZDestConstBitDepth uint32
Anonymous1 _Anonymous1_e__Union
dwZSrcConstBitDepth uint32
Anonymous2 _Anonymous2_e__Union
dwAlphaEdgeBlendBitDepth uint32
dwAlphaEdgeBlend uint32
dwReserved uint32
dwAlphaDestConstBitDepth uint32
Anonymous3 _Anonymous3_e__Union
dwAlphaSrcConstBitDepth uint32
Anonymous4 _Anonymous4_e__Union
Anonymous5 _Anonymous5_e__Union
ddckDestColorkey DDCOLORKEY
ddckSrcColorkey DDCOLORKEY
}
type DDHAL_BLTDATA struct {
lpDD uintptr
lpDDDestSurface uintptr
rDest RECTL
lpDDSrcSurface uintptr
rSrc RECTL
dwFlags uint32
dwROPFlags uint32
bltFX DDBLTFX
ddRVal int32
Blt uintptr
IsClipped int32
rOrigDest RECTL
rOrigSrc RECTL
dwRectCnt uint32
prDestRects uintptr
}type
RECTL = record
left: Integer;
top: Integer;
right: Integer;
bottom: Integer;
end;
DDCOLORKEY = record
dwColorSpaceLowValue: DWORD;
dwColorSpaceHighValue: DWORD;
end;
DDBLTFX = record
dwSize: DWORD;
dwDDFX: DWORD;
dwROP: DWORD;
dwDDROP: DWORD;
dwRotationAngle: DWORD;
dwZBufferOpCode: DWORD;
dwZBufferLow: DWORD;
dwZBufferHigh: DWORD;
dwZBufferBaseDest: DWORD;
dwZDestConstBitDepth: DWORD;
Anonymous1: _Anonymous1_e__Union;
dwZSrcConstBitDepth: DWORD;
Anonymous2: _Anonymous2_e__Union;
dwAlphaEdgeBlendBitDepth: DWORD;
dwAlphaEdgeBlend: DWORD;
dwReserved: DWORD;
dwAlphaDestConstBitDepth: DWORD;
Anonymous3: _Anonymous3_e__Union;
dwAlphaSrcConstBitDepth: DWORD;
Anonymous4: _Anonymous4_e__Union;
Anonymous5: _Anonymous5_e__Union;
ddckDestColorkey: DDCOLORKEY;
ddckSrcColorkey: DDCOLORKEY;
end;
DDHAL_BLTDATA = record
lpDD: Pointer;
lpDDDestSurface: Pointer;
rDest: RECTL;
lpDDSrcSurface: Pointer;
rSrc: RECTL;
dwFlags: DWORD;
dwROPFlags: DWORD;
bltFX: DDBLTFX;
ddRVal: Integer;
Blt: Pointer;
IsClipped: BOOL;
rOrigDest: RECTL;
rOrigSrc: RECTL;
dwRectCnt: DWORD;
prDestRects: Pointer;
end;const RECTL = extern struct {
left: i32,
top: i32,
right: i32,
bottom: i32,
};
const DDCOLORKEY = extern struct {
dwColorSpaceLowValue: u32,
dwColorSpaceHighValue: u32,
};
const DDBLTFX = extern struct {
dwSize: u32,
dwDDFX: u32,
dwROP: u32,
dwDDROP: u32,
dwRotationAngle: u32,
dwZBufferOpCode: u32,
dwZBufferLow: u32,
dwZBufferHigh: u32,
dwZBufferBaseDest: u32,
dwZDestConstBitDepth: u32,
Anonymous1: _Anonymous1_e__Union,
dwZSrcConstBitDepth: u32,
Anonymous2: _Anonymous2_e__Union,
dwAlphaEdgeBlendBitDepth: u32,
dwAlphaEdgeBlend: u32,
dwReserved: u32,
dwAlphaDestConstBitDepth: u32,
Anonymous3: _Anonymous3_e__Union,
dwAlphaSrcConstBitDepth: u32,
Anonymous4: _Anonymous4_e__Union,
Anonymous5: _Anonymous5_e__Union,
ddckDestColorkey: DDCOLORKEY,
ddckSrcColorkey: DDCOLORKEY,
};
const DDHAL_BLTDATA = extern struct {
lpDD: ?*anyopaque,
lpDDDestSurface: ?*anyopaque,
rDest: RECTL,
lpDDSrcSurface: ?*anyopaque,
rSrc: RECTL,
dwFlags: u32,
dwROPFlags: u32,
bltFX: DDBLTFX,
ddRVal: i32,
Blt: ?*anyopaque,
IsClipped: i32,
rOrigDest: RECTL,
rOrigSrc: RECTL,
dwRectCnt: u32,
prDestRects: ?*anyopaque,
};type
RECTL {.bycopy.} = object
left: int32
top: int32
right: int32
bottom: int32
DDCOLORKEY {.bycopy.} = object
dwColorSpaceLowValue: uint32
dwColorSpaceHighValue: uint32
DDBLTFX {.bycopy.} = object
dwSize: uint32
dwDDFX: uint32
dwROP: uint32
dwDDROP: uint32
dwRotationAngle: uint32
dwZBufferOpCode: uint32
dwZBufferLow: uint32
dwZBufferHigh: uint32
dwZBufferBaseDest: uint32
dwZDestConstBitDepth: uint32
Anonymous1: _Anonymous1_e__Union
dwZSrcConstBitDepth: uint32
Anonymous2: _Anonymous2_e__Union
dwAlphaEdgeBlendBitDepth: uint32
dwAlphaEdgeBlend: uint32
dwReserved: uint32
dwAlphaDestConstBitDepth: uint32
Anonymous3: _Anonymous3_e__Union
dwAlphaSrcConstBitDepth: uint32
Anonymous4: _Anonymous4_e__Union
Anonymous5: _Anonymous5_e__Union
ddckDestColorkey: DDCOLORKEY
ddckSrcColorkey: DDCOLORKEY
DDHAL_BLTDATA {.bycopy.} = object
lpDD: pointer
lpDDDestSurface: pointer
rDest: RECTL
lpDDSrcSurface: pointer
rSrc: RECTL
dwFlags: uint32
dwROPFlags: uint32
bltFX: DDBLTFX
ddRVal: int32
Blt: pointer
IsClipped: int32
rOrigDest: RECTL
rOrigSrc: RECTL
dwRectCnt: uint32
prDestRects: pointerstruct RECTL
{
int left;
int top;
int right;
int bottom;
}
struct DDCOLORKEY
{
uint dwColorSpaceLowValue;
uint dwColorSpaceHighValue;
}
struct DDBLTFX
{
uint dwSize;
uint dwDDFX;
uint dwROP;
uint dwDDROP;
uint dwRotationAngle;
uint dwZBufferOpCode;
uint dwZBufferLow;
uint dwZBufferHigh;
uint dwZBufferBaseDest;
uint dwZDestConstBitDepth;
_Anonymous1_e__Union Anonymous1;
uint dwZSrcConstBitDepth;
_Anonymous2_e__Union Anonymous2;
uint dwAlphaEdgeBlendBitDepth;
uint dwAlphaEdgeBlend;
uint dwReserved;
uint dwAlphaDestConstBitDepth;
_Anonymous3_e__Union Anonymous3;
uint dwAlphaSrcConstBitDepth;
_Anonymous4_e__Union Anonymous4;
_Anonymous5_e__Union Anonymous5;
DDCOLORKEY ddckDestColorkey;
DDCOLORKEY ddckSrcColorkey;
}
struct DDHAL_BLTDATA
{
void* lpDD;
void* lpDDDestSurface;
RECTL rDest;
void* lpDDSrcSurface;
RECTL rSrc;
uint dwFlags;
uint dwROPFlags;
DDBLTFX bltFX;
int ddRVal;
void* Blt;
int IsClipped;
RECTL rOrigDest;
RECTL rOrigSrc;
uint dwRectCnt;
void* prDestRects;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DDHAL_BLTDATA サイズ: 204 バイト(x86)
dim st, 51 ; 4byte整数×51(構造体サイズ 204 / 4 切り上げ)
; lpDD : DDRAWI_DIRECTDRAW_GBL* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; lpDDDestSurface : DDRAWI_DDRAWSURFACE_LCL* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; rDest : RECTL (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; lpDDSrcSurface : DDRAWI_DDRAWSURFACE_LCL* (+24, 4byte) varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; rSrc : RECTL (+28, 16byte) varptr(st)+28 を基点に操作(16byte:入れ子/配列)
; dwFlags : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; dwROPFlags : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; bltFX : DDBLTFX (+52, 100byte) varptr(st)+52 を基点に操作(100byte:入れ子/配列)
; ddRVal : HRESULT (+152, 4byte) st.38 = 値 / 値 = st.38 (lpoke/lpeek も可)
; Blt : LPDDHALSURFCB_BLT (+156, 4byte) st.39 = 値 / 値 = st.39 (lpoke/lpeek も可)
; IsClipped : BOOL (+160, 4byte) st.40 = 値 / 値 = st.40 (lpoke/lpeek も可)
; rOrigDest : RECTL (+164, 16byte) varptr(st)+164 を基点に操作(16byte:入れ子/配列)
; rOrigSrc : RECTL (+180, 16byte) varptr(st)+180 を基点に操作(16byte:入れ子/配列)
; dwRectCnt : DWORD (+196, 4byte) st.49 = 値 / 値 = st.49 (lpoke/lpeek も可)
; prDestRects : RECT* (+200, 4byte) varptr(st)+200 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DDHAL_BLTDATA サイズ: 256 バイト(x64)
dim st, 64 ; 4byte整数×64(構造体サイズ 256 / 4 切り上げ)
; lpDD : DDRAWI_DIRECTDRAW_GBL* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; lpDDDestSurface : DDRAWI_DDRAWSURFACE_LCL* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; rDest : RECTL (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; lpDDSrcSurface : DDRAWI_DDRAWSURFACE_LCL* (+32, 8byte) varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; rSrc : RECTL (+40, 16byte) varptr(st)+40 を基点に操作(16byte:入れ子/配列)
; dwFlags : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; dwROPFlags : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; bltFX : DDBLTFX (+64, 128byte) varptr(st)+64 を基点に操作(128byte:入れ子/配列)
; ddRVal : HRESULT (+192, 4byte) st.48 = 値 / 値 = st.48 (lpoke/lpeek も可)
; Blt : LPDDHALSURFCB_BLT (+200, 8byte) qpoke st,200,値 / qpeek(st,200) ※IronHSPのみ。3.7/3.8は lpoke st,200,下位 : lpoke st,204,上位
; IsClipped : BOOL (+208, 4byte) st.52 = 値 / 値 = st.52 (lpoke/lpeek も可)
; rOrigDest : RECTL (+212, 16byte) varptr(st)+212 を基点に操作(16byte:入れ子/配列)
; rOrigSrc : RECTL (+228, 16byte) varptr(st)+228 を基点に操作(16byte:入れ子/配列)
; dwRectCnt : DWORD (+244, 4byte) st.61 = 値 / 値 = st.61 (lpoke/lpeek も可)
; prDestRects : RECT* (+248, 8byte) varptr(st)+248 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global RECTL
#field int left
#field int top
#field int right
#field int bottom
#endstruct
#defstruct global DDCOLORKEY
#field int dwColorSpaceLowValue
#field int dwColorSpaceHighValue
#endstruct
#defstruct global DDBLTFX
#field int dwSize
#field int dwDDFX
#field int dwROP
#field int dwDDROP
#field int dwRotationAngle
#field int dwZBufferOpCode
#field int dwZBufferLow
#field int dwZBufferHigh
#field int dwZBufferBaseDest
#field int dwZDestConstBitDepth
#field byte Anonymous1 8
#field int dwZSrcConstBitDepth
#field byte Anonymous2 8
#field int dwAlphaEdgeBlendBitDepth
#field int dwAlphaEdgeBlend
#field int dwReserved
#field int dwAlphaDestConstBitDepth
#field byte Anonymous3 8
#field int dwAlphaSrcConstBitDepth
#field byte Anonymous4 8
#field byte Anonymous5 8
#field DDCOLORKEY ddckDestColorkey
#field DDCOLORKEY ddckSrcColorkey
#endstruct
#defstruct global DDHAL_BLTDATA
#field intptr lpDD
#field intptr lpDDDestSurface
#field RECTL rDest
#field intptr lpDDSrcSurface
#field RECTL rSrc
#field int dwFlags
#field int dwROPFlags
#field DDBLTFX bltFX
#field int ddRVal
#field intptr Blt
#field bool IsClipped
#field RECTL rOrigDest
#field RECTL rOrigSrc
#field int dwRectCnt
#field intptr prDestRects
#endstruct
stdim st, DDHAL_BLTDATA ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags