ホーム › Graphics.DirectDraw › DD_GETVPORTINPUTFORMATDATA
DD_GETVPORTINPUTFORMATDATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| lpDD | DD_DIRECTDRAW_LOCAL* | 8/4 | +0 | +0 | 現在の Microsoft DirectDraw プロセスにのみ関係する DD_DIRECTDRAW_LOCAL 構造体を指します。 | ||||||
| lpVideoPort | DD_VIDEOPORT_LOCAL* | 8/4 | +8 | +4 | この VPE オブジェクトを表す DD_VIDEOPORT_LOCAL 構造体を指します。 | ||||||
| dwFlags | DWORD | 4 | +16 | +8 | サポートの有無を照会するフォーマットの種類を示します。このメンバーには、次の値のうち 1 つ以上を指定できます。
| ||||||
| lpddpfFormat | DDPIXELFORMAT* | 8/4 | +24 | +12 | VPE オブジェクトがサポートするピクセルフォーマットをドライバーが書き込む DDPIXELFORMAT 構造体の配列を指します。このメンバーは NULL でもかまいません。 | ||||||
| dwNumFormats | DWORD | 4 | +32 | +16 | VPE オブジェクトがサポートするフォーマットの数をドライバーが書き込む場所を指定します。 | ||||||
| ddRVal | HRESULT | 4 | +36 | +20 | DdVideoPortGetInputFormats コールバックの戻り値をドライバーが書き込む場所を指定します。戻りコード DD_OK は成功を示します。詳細については、Return Values for DirectDraw を参照してください。 | ||||||
| GetVideoPortInputFormats | void* | 8/4 | +40 | +24 | DirectDraw API が使用します。ドライバーが値を設定してはなりません。 |
公式ドキュメント
DD_GETVPORTINPUTFORMATDATA 構造体には、ビデオポート拡張 (VPE) オブジェクトが受け入れ可能な入力フォーマットをドライバーが返すために必要な情報が格納されます。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// DD_GETVPORTINPUTFORMATDATA (x64 48 / x86 28 バイト)
typedef struct DD_GETVPORTINPUTFORMATDATA {
DD_DIRECTDRAW_LOCAL* lpDD;
DD_VIDEOPORT_LOCAL* lpVideoPort;
DWORD dwFlags;
DDPIXELFORMAT* lpddpfFormat;
DWORD dwNumFormats;
HRESULT ddRVal;
void* GetVideoPortInputFormats;
} DD_GETVPORTINPUTFORMATDATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DD_GETVPORTINPUTFORMATDATA
{
public IntPtr lpDD;
public IntPtr lpVideoPort;
public uint dwFlags;
public IntPtr lpddpfFormat;
public uint dwNumFormats;
public int ddRVal;
public IntPtr GetVideoPortInputFormats;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DD_GETVPORTINPUTFORMATDATA
Public lpDD As IntPtr
Public lpVideoPort As IntPtr
Public dwFlags As UInteger
Public lpddpfFormat As IntPtr
Public dwNumFormats As UInteger
Public ddRVal As Integer
Public GetVideoPortInputFormats As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class DD_GETVPORTINPUTFORMATDATA(ctypes.Structure):
_fields_ = [
("lpDD", ctypes.c_void_p),
("lpVideoPort", ctypes.c_void_p),
("dwFlags", wintypes.DWORD),
("lpddpfFormat", ctypes.c_void_p),
("dwNumFormats", wintypes.DWORD),
("ddRVal", ctypes.c_int),
("GetVideoPortInputFormats", ctypes.c_void_p),
]#[repr(C)]
pub struct DD_GETVPORTINPUTFORMATDATA {
pub lpDD: *mut core::ffi::c_void,
pub lpVideoPort: *mut core::ffi::c_void,
pub dwFlags: u32,
pub lpddpfFormat: *mut core::ffi::c_void,
pub dwNumFormats: u32,
pub ddRVal: i32,
pub GetVideoPortInputFormats: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type DD_GETVPORTINPUTFORMATDATA struct {
lpDD uintptr
lpVideoPort uintptr
dwFlags uint32
lpddpfFormat uintptr
dwNumFormats uint32
ddRVal int32
GetVideoPortInputFormats uintptr
}type
DD_GETVPORTINPUTFORMATDATA = record
lpDD: Pointer;
lpVideoPort: Pointer;
dwFlags: DWORD;
lpddpfFormat: Pointer;
dwNumFormats: DWORD;
ddRVal: Integer;
GetVideoPortInputFormats: Pointer;
end;const DD_GETVPORTINPUTFORMATDATA = extern struct {
lpDD: ?*anyopaque,
lpVideoPort: ?*anyopaque,
dwFlags: u32,
lpddpfFormat: ?*anyopaque,
dwNumFormats: u32,
ddRVal: i32,
GetVideoPortInputFormats: ?*anyopaque,
};type
DD_GETVPORTINPUTFORMATDATA {.bycopy.} = object
lpDD: pointer
lpVideoPort: pointer
dwFlags: uint32
lpddpfFormat: pointer
dwNumFormats: uint32
ddRVal: int32
GetVideoPortInputFormats: pointerstruct DD_GETVPORTINPUTFORMATDATA
{
void* lpDD;
void* lpVideoPort;
uint dwFlags;
void* lpddpfFormat;
uint dwNumFormats;
int ddRVal;
void* GetVideoPortInputFormats;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DD_GETVPORTINPUTFORMATDATA サイズ: 28 バイト(x86)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; lpDD : DD_DIRECTDRAW_LOCAL* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; lpVideoPort : DD_VIDEOPORT_LOCAL* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; dwFlags : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; lpddpfFormat : DDPIXELFORMAT* (+12, 4byte) varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; dwNumFormats : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ddRVal : HRESULT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; GetVideoPortInputFormats : void* (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DD_GETVPORTINPUTFORMATDATA サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; lpDD : DD_DIRECTDRAW_LOCAL* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; lpVideoPort : DD_VIDEOPORT_LOCAL* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; dwFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; lpddpfFormat : DDPIXELFORMAT* (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; dwNumFormats : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ddRVal : HRESULT (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; GetVideoPortInputFormats : void* (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DD_GETVPORTINPUTFORMATDATA
#field intptr lpDD
#field intptr lpVideoPort
#field int dwFlags
#field intptr lpddpfFormat
#field int dwNumFormats
#field int ddRVal
#field intptr GetVideoPortInputFormats
#endstruct
stdim st, DD_GETVPORTINPUTFORMATDATA ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags