ホーム › Graphics.DirectDraw › DDFLIPVIDEOPORTINFO
DDFLIPVIDEOPORTINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| lpVideoPortData | DDVIDEOPORTDATA* | 8/4 | +0 | +0 | 対象ビデオポートのデータDDVIDEOPORTDATAへのポインタ。 |
| lpCurrentSurface | DDSURFACEDATA* | 8/4 | +8 | +4 | 現在のビデオポートサーフェスデータへのポインタ。 |
| lpTargetSurface | DDSURFACEDATA* | 8/4 | +16 | +8 | フリップ先のビデオポートサーフェスデータへのポインタ。 |
| dwFlipVPFlags | DWORD | 4 | +24 | +12 | ビデオポートフリップ動作を制御するフラグ。 |
各言語での定義
#include <windows.h>
// DDFLIPVIDEOPORTINFO (x64 32 / x86 16 バイト)
typedef struct DDFLIPVIDEOPORTINFO {
DDVIDEOPORTDATA* lpVideoPortData;
DDSURFACEDATA* lpCurrentSurface;
DDSURFACEDATA* lpTargetSurface;
DWORD dwFlipVPFlags;
} DDFLIPVIDEOPORTINFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDFLIPVIDEOPORTINFO
{
public IntPtr lpVideoPortData;
public IntPtr lpCurrentSurface;
public IntPtr lpTargetSurface;
public uint dwFlipVPFlags;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDFLIPVIDEOPORTINFO
Public lpVideoPortData As IntPtr
Public lpCurrentSurface As IntPtr
Public lpTargetSurface As IntPtr
Public dwFlipVPFlags As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DDFLIPVIDEOPORTINFO(ctypes.Structure):
_fields_ = [
("lpVideoPortData", ctypes.c_void_p),
("lpCurrentSurface", ctypes.c_void_p),
("lpTargetSurface", ctypes.c_void_p),
("dwFlipVPFlags", wintypes.DWORD),
]#[repr(C)]
pub struct DDFLIPVIDEOPORTINFO {
pub lpVideoPortData: *mut core::ffi::c_void,
pub lpCurrentSurface: *mut core::ffi::c_void,
pub lpTargetSurface: *mut core::ffi::c_void,
pub dwFlipVPFlags: u32,
}import "golang.org/x/sys/windows"
type DDFLIPVIDEOPORTINFO struct {
lpVideoPortData uintptr
lpCurrentSurface uintptr
lpTargetSurface uintptr
dwFlipVPFlags uint32
}type
DDFLIPVIDEOPORTINFO = record
lpVideoPortData: Pointer;
lpCurrentSurface: Pointer;
lpTargetSurface: Pointer;
dwFlipVPFlags: DWORD;
end;const DDFLIPVIDEOPORTINFO = extern struct {
lpVideoPortData: ?*anyopaque,
lpCurrentSurface: ?*anyopaque,
lpTargetSurface: ?*anyopaque,
dwFlipVPFlags: u32,
};type
DDFLIPVIDEOPORTINFO {.bycopy.} = object
lpVideoPortData: pointer
lpCurrentSurface: pointer
lpTargetSurface: pointer
dwFlipVPFlags: uint32struct DDFLIPVIDEOPORTINFO
{
void* lpVideoPortData;
void* lpCurrentSurface;
void* lpTargetSurface;
uint dwFlipVPFlags;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DDFLIPVIDEOPORTINFO サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; lpVideoPortData : DDVIDEOPORTDATA* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; lpCurrentSurface : DDSURFACEDATA* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; lpTargetSurface : DDSURFACEDATA* (+8, 4byte) varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; dwFlipVPFlags : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DDFLIPVIDEOPORTINFO サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; lpVideoPortData : DDVIDEOPORTDATA* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; lpCurrentSurface : DDSURFACEDATA* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; lpTargetSurface : DDSURFACEDATA* (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; dwFlipVPFlags : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DDFLIPVIDEOPORTINFO
#field intptr lpVideoPortData
#field intptr lpCurrentSurface
#field intptr lpTargetSurface
#field int dwFlipVPFlags
#endstruct
stdim st, DDFLIPVIDEOPORTINFO ; NSTRUCT 変数を確保
st->dwFlipVPFlags = 100
mes "dwFlipVPFlags=" + st->dwFlipVPFlags