ホーム › Graphics.DirectDraw › DD_DESTROYVPORTDATA
DD_DESTROYVPORTDATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| lpDD | DD_DIRECTDRAW_LOCAL* | 8/4 | +0 | +0 | 対象のDirectDrawローカルオブジェクトへのポインタ。 |
| lpVideoPort | DD_VIDEOPORT_LOCAL* | 8/4 | +8 | +4 | 破棄対象のビデオポートローカルオブジェクトへのポインタ。 |
| ddRVal | HRESULT | 4 | +16 | +8 | 操作の結果を示すHRESULT。成功時はDD_OK。 |
| DestroyVideoPort | void* | 8/4 | +24 | +12 | ビデオポート破棄処理を行うコールバック関数へのポインタ。 |
各言語での定義
#include <windows.h>
// DD_DESTROYVPORTDATA (x64 32 / x86 16 バイト)
typedef struct DD_DESTROYVPORTDATA {
DD_DIRECTDRAW_LOCAL* lpDD;
DD_VIDEOPORT_LOCAL* lpVideoPort;
HRESULT ddRVal;
void* DestroyVideoPort;
} DD_DESTROYVPORTDATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DD_DESTROYVPORTDATA
{
public IntPtr lpDD;
public IntPtr lpVideoPort;
public int ddRVal;
public IntPtr DestroyVideoPort;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DD_DESTROYVPORTDATA
Public lpDD As IntPtr
Public lpVideoPort As IntPtr
Public ddRVal As Integer
Public DestroyVideoPort As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class DD_DESTROYVPORTDATA(ctypes.Structure):
_fields_ = [
("lpDD", ctypes.c_void_p),
("lpVideoPort", ctypes.c_void_p),
("ddRVal", ctypes.c_int),
("DestroyVideoPort", ctypes.c_void_p),
]#[repr(C)]
pub struct DD_DESTROYVPORTDATA {
pub lpDD: *mut core::ffi::c_void,
pub lpVideoPort: *mut core::ffi::c_void,
pub ddRVal: i32,
pub DestroyVideoPort: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type DD_DESTROYVPORTDATA struct {
lpDD uintptr
lpVideoPort uintptr
ddRVal int32
DestroyVideoPort uintptr
}type
DD_DESTROYVPORTDATA = record
lpDD: Pointer;
lpVideoPort: Pointer;
ddRVal: Integer;
DestroyVideoPort: Pointer;
end;const DD_DESTROYVPORTDATA = extern struct {
lpDD: ?*anyopaque,
lpVideoPort: ?*anyopaque,
ddRVal: i32,
DestroyVideoPort: ?*anyopaque,
};type
DD_DESTROYVPORTDATA {.bycopy.} = object
lpDD: pointer
lpVideoPort: pointer
ddRVal: int32
DestroyVideoPort: pointerstruct DD_DESTROYVPORTDATA
{
void* lpDD;
void* lpVideoPort;
int ddRVal;
void* DestroyVideoPort;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DD_DESTROYVPORTDATA サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; lpDD : DD_DIRECTDRAW_LOCAL* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; lpVideoPort : DD_VIDEOPORT_LOCAL* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; ddRVal : HRESULT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; DestroyVideoPort : void* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DD_DESTROYVPORTDATA サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; lpDD : DD_DIRECTDRAW_LOCAL* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; lpVideoPort : DD_VIDEOPORT_LOCAL* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; ddRVal : HRESULT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; DestroyVideoPort : void* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DD_DESTROYVPORTDATA
#field intptr lpDD
#field intptr lpVideoPort
#field int ddRVal
#field intptr DestroyVideoPort
#endstruct
stdim st, DD_DESTROYVPORTDATA ; NSTRUCT 変数を確保
st->ddRVal = 100
mes "ddRVal=" + st->ddRVal