Win32 API 日本語リファレンス
ホームGraphics.DirectDraw › DDHAL_DESTROYDDLOCALDATA

DDHAL_DESTROYDDLOCALDATA

構造体
サイズx64: 24 バイト / x86: 12 バイト

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

フィールド

フィールドサイズx64x86説明
dwFlagsDWORD4+0+0破棄動作を示すフラグを示す。
pDDLclDDRAWI_DIRECTDRAW_LCL*8/4+8+4破棄対象のローカルDirectDrawオブジェクトへのポインタ。
ddRValHRESULT4+16+8破棄処理の実行結果を示すHRESULT。

各言語での定義

#include <windows.h>

// DDHAL_DESTROYDDLOCALDATA  (x64 24 / x86 12 バイト)
typedef struct DDHAL_DESTROYDDLOCALDATA {
    DWORD dwFlags;
    DDRAWI_DIRECTDRAW_LCL* pDDLcl;
    HRESULT ddRVal;
} DDHAL_DESTROYDDLOCALDATA;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDHAL_DESTROYDDLOCALDATA
{
    public uint dwFlags;
    public IntPtr pDDLcl;
    public int ddRVal;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDHAL_DESTROYDDLOCALDATA
    Public dwFlags As UInteger
    Public pDDLcl As IntPtr
    Public ddRVal As Integer
End Structure
import ctypes
from ctypes import wintypes

class DDHAL_DESTROYDDLOCALDATA(ctypes.Structure):
    _fields_ = [
        ("dwFlags", wintypes.DWORD),
        ("pDDLcl", ctypes.c_void_p),
        ("ddRVal", ctypes.c_int),
    ]
#[repr(C)]
pub struct DDHAL_DESTROYDDLOCALDATA {
    pub dwFlags: u32,
    pub pDDLcl: *mut core::ffi::c_void,
    pub ddRVal: i32,
}
import "golang.org/x/sys/windows"

type DDHAL_DESTROYDDLOCALDATA struct {
	dwFlags uint32
	pDDLcl uintptr
	ddRVal int32
}
type
  DDHAL_DESTROYDDLOCALDATA = record
    dwFlags: DWORD;
    pDDLcl: Pointer;
    ddRVal: Integer;
  end;
const DDHAL_DESTROYDDLOCALDATA = extern struct {
    dwFlags: u32,
    pDDLcl: ?*anyopaque,
    ddRVal: i32,
};
type
  DDHAL_DESTROYDDLOCALDATA {.bycopy.} = object
    dwFlags: uint32
    pDDLcl: pointer
    ddRVal: int32
struct DDHAL_DESTROYDDLOCALDATA
{
    uint dwFlags;
    void* pDDLcl;
    int ddRVal;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DDHAL_DESTROYDDLOCALDATA サイズ: 12 バイト(x86)
dim st, 3    ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; dwFlags : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; pDDLcl : DDRAWI_DIRECTDRAW_LCL* (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; ddRVal : HRESULT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DDHAL_DESTROYDDLOCALDATA サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; dwFlags : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; pDDLcl : DDRAWI_DIRECTDRAW_LCL* (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; ddRVal : HRESULT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DDHAL_DESTROYDDLOCALDATA
    #field int dwFlags
    #field intptr pDDLcl
    #field int ddRVal
#endstruct

stdim st, DDHAL_DESTROYDDLOCALDATA        ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags