ホーム › Graphics.DirectDraw › DDRAWI_DDRAWCLIPPER_LCL
DDRAWI_DDRAWCLIPPER_LCL
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| lpClipMore | DWORD | 4 | +0 | +0 | 追加クリッパー情報へのポインタ(予約)を示す。 |
| lpGbl | DDRAWI_DDRAWCLIPPER_GBL* | 8/4 | +8 | +4 | 対応するグローバルクリッパーオブジェクトへのポインタ。 |
| lpDD_lcl | DDRAWI_DIRECTDRAW_LCL* | 8/4 | +16 | +8 | 所属するローカルDirectDrawオブジェクトへのポインタ。 |
| dwLocalRefCnt | DWORD | 4 | +24 | +12 | ローカルクリッパーオブジェクトの参照カウントを示す。 |
| pUnkOuter | IUnknown* | 8/4 | +32 | +16 | アグリゲーション時の外部IUnknownへのポインタ。NULL可。 |
| lpDD_int | DDRAWI_DIRECTDRAW_INT* | 8/4 | +40 | +20 | 関連するDirectDrawインターフェイスオブジェクトへのポインタ。 |
| dwReserved1 | UINT_PTR | 8/4 | +48 | +24 | 予約フィールド。0とする。 |
| pAddrefedThisOwner | IUnknown* | 8/4 | +56 | +28 | 参照を保持する所有者IUnknownへのポインタ。NULL可。 |
各言語での定義
#include <windows.h>
// DDRAWI_DDRAWCLIPPER_LCL (x64 64 / x86 32 バイト)
typedef struct DDRAWI_DDRAWCLIPPER_LCL {
DWORD lpClipMore;
DDRAWI_DDRAWCLIPPER_GBL* lpGbl;
DDRAWI_DIRECTDRAW_LCL* lpDD_lcl;
DWORD dwLocalRefCnt;
IUnknown* pUnkOuter;
DDRAWI_DIRECTDRAW_INT* lpDD_int;
UINT_PTR dwReserved1;
IUnknown* pAddrefedThisOwner;
} DDRAWI_DDRAWCLIPPER_LCL;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDRAWI_DDRAWCLIPPER_LCL
{
public uint lpClipMore;
public IntPtr lpGbl;
public IntPtr lpDD_lcl;
public uint dwLocalRefCnt;
public IntPtr pUnkOuter;
public IntPtr lpDD_int;
public UIntPtr dwReserved1;
public IntPtr pAddrefedThisOwner;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDRAWI_DDRAWCLIPPER_LCL
Public lpClipMore As UInteger
Public lpGbl As IntPtr
Public lpDD_lcl As IntPtr
Public dwLocalRefCnt As UInteger
Public pUnkOuter As IntPtr
Public lpDD_int As IntPtr
Public dwReserved1 As UIntPtr
Public pAddrefedThisOwner As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class DDRAWI_DDRAWCLIPPER_LCL(ctypes.Structure):
_fields_ = [
("lpClipMore", wintypes.DWORD),
("lpGbl", ctypes.c_void_p),
("lpDD_lcl", ctypes.c_void_p),
("dwLocalRefCnt", wintypes.DWORD),
("pUnkOuter", ctypes.c_void_p),
("lpDD_int", ctypes.c_void_p),
("dwReserved1", ctypes.c_size_t),
("pAddrefedThisOwner", ctypes.c_void_p),
]#[repr(C)]
pub struct DDRAWI_DDRAWCLIPPER_LCL {
pub lpClipMore: u32,
pub lpGbl: *mut core::ffi::c_void,
pub lpDD_lcl: *mut core::ffi::c_void,
pub dwLocalRefCnt: u32,
pub pUnkOuter: *mut core::ffi::c_void,
pub lpDD_int: *mut core::ffi::c_void,
pub dwReserved1: usize,
pub pAddrefedThisOwner: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type DDRAWI_DDRAWCLIPPER_LCL struct {
lpClipMore uint32
lpGbl uintptr
lpDD_lcl uintptr
dwLocalRefCnt uint32
pUnkOuter uintptr
lpDD_int uintptr
dwReserved1 uintptr
pAddrefedThisOwner uintptr
}type
DDRAWI_DDRAWCLIPPER_LCL = record
lpClipMore: DWORD;
lpGbl: Pointer;
lpDD_lcl: Pointer;
dwLocalRefCnt: DWORD;
pUnkOuter: Pointer;
lpDD_int: Pointer;
dwReserved1: NativeUInt;
pAddrefedThisOwner: Pointer;
end;const DDRAWI_DDRAWCLIPPER_LCL = extern struct {
lpClipMore: u32,
lpGbl: ?*anyopaque,
lpDD_lcl: ?*anyopaque,
dwLocalRefCnt: u32,
pUnkOuter: ?*anyopaque,
lpDD_int: ?*anyopaque,
dwReserved1: usize,
pAddrefedThisOwner: ?*anyopaque,
};type
DDRAWI_DDRAWCLIPPER_LCL {.bycopy.} = object
lpClipMore: uint32
lpGbl: pointer
lpDD_lcl: pointer
dwLocalRefCnt: uint32
pUnkOuter: pointer
lpDD_int: pointer
dwReserved1: uint
pAddrefedThisOwner: pointerstruct DDRAWI_DDRAWCLIPPER_LCL
{
uint lpClipMore;
void* lpGbl;
void* lpDD_lcl;
uint dwLocalRefCnt;
void* pUnkOuter;
void* lpDD_int;
size_t dwReserved1;
void* pAddrefedThisOwner;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DDRAWI_DDRAWCLIPPER_LCL サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; lpClipMore : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lpGbl : DDRAWI_DDRAWCLIPPER_GBL* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; lpDD_lcl : DDRAWI_DIRECTDRAW_LCL* (+8, 4byte) varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; dwLocalRefCnt : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pUnkOuter : IUnknown* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; lpDD_int : DDRAWI_DIRECTDRAW_INT* (+20, 4byte) varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; dwReserved1 : UINT_PTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; pAddrefedThisOwner : IUnknown* (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DDRAWI_DDRAWCLIPPER_LCL サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; lpClipMore : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lpGbl : DDRAWI_DDRAWCLIPPER_GBL* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; lpDD_lcl : DDRAWI_DIRECTDRAW_LCL* (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; dwLocalRefCnt : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; pUnkOuter : IUnknown* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; lpDD_int : DDRAWI_DIRECTDRAW_INT* (+40, 8byte) varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; dwReserved1 : UINT_PTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; pAddrefedThisOwner : IUnknown* (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DDRAWI_DDRAWCLIPPER_LCL
#field int lpClipMore
#field intptr lpGbl
#field intptr lpDD_lcl
#field int dwLocalRefCnt
#field intptr pUnkOuter
#field intptr lpDD_int
#field intptr dwReserved1
#field intptr pAddrefedThisOwner
#endstruct
stdim st, DDRAWI_DDRAWCLIPPER_LCL ; NSTRUCT 変数を確保
st->lpClipMore = 100
mes "lpClipMore=" + st->lpClipMore