ホーム › Graphics.DirectDraw › DD_GETVPORTOUTPUTFORMATDATA
DD_GETVPORTOUTPUTFORMATDATA
構造体サイズ=各フィールドのバイト数(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 つ以上を指定できます。
| ||||||
| lpddpfInputFormat | DDPIXELFORMAT* | 8/4 | +24 | +12 | VPE オブジェクトがサポートする入力フォーマットを格納した DDPIXELFORMAT 構造体を指すポインターです。このフォーマットは DdVideoPortGetInputFormats によって返されたものです。 | ||||||
| lpddpfOutputFormats | DDPIXELFORMAT* | 8/4 | +32 | +16 | DDPIXELFORMAT 構造体の配列を指すポインターです。ドライバーは、lpddpfInputFormat で指定された入力フォーマットに対して VPE オブジェクトがサポートする出力フォーマットを、この配列に返します。このメンバーは NULL でもかまいません。 | ||||||
| dwNumFormats | DWORD | 4 | +40 | +20 | 指定された入力フォーマットに対して VPE オブジェクトがサポートする出力フォーマットの数を、ドライバーが返す場所を指定します。 | ||||||
| ddRVal | HRESULT | 4 | +44 | +24 | DdVideoPortGetOutputFormats コールバックの戻り値をドライバーが書き込む場所を指定します。戻り値 DD_OK は成功を示します。詳細については、「Return Values for DirectDraw」を参照してください。 | ||||||
| GetVideoPortInputFormats | void* | 8/4 | +48 | +28 | 未使用: Win95 との互換性のためのものです。 |
公式ドキュメント
DD_GETVPORTOUTPUTFORMATDATA 構造体には、指定された入力フォーマットに対して video port extensions (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_GETVPORTOUTPUTFORMATDATA (x64 56 / x86 32 バイト)
typedef struct DD_GETVPORTOUTPUTFORMATDATA {
DD_DIRECTDRAW_LOCAL* lpDD;
DD_VIDEOPORT_LOCAL* lpVideoPort;
DWORD dwFlags;
DDPIXELFORMAT* lpddpfInputFormat;
DDPIXELFORMAT* lpddpfOutputFormats;
DWORD dwNumFormats;
HRESULT ddRVal;
void* GetVideoPortInputFormats;
} DD_GETVPORTOUTPUTFORMATDATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DD_GETVPORTOUTPUTFORMATDATA
{
public IntPtr lpDD;
public IntPtr lpVideoPort;
public uint dwFlags;
public IntPtr lpddpfInputFormat;
public IntPtr lpddpfOutputFormats;
public uint dwNumFormats;
public int ddRVal;
public IntPtr GetVideoPortInputFormats;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DD_GETVPORTOUTPUTFORMATDATA
Public lpDD As IntPtr
Public lpVideoPort As IntPtr
Public dwFlags As UInteger
Public lpddpfInputFormat As IntPtr
Public lpddpfOutputFormats As IntPtr
Public dwNumFormats As UInteger
Public ddRVal As Integer
Public GetVideoPortInputFormats As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class DD_GETVPORTOUTPUTFORMATDATA(ctypes.Structure):
_fields_ = [
("lpDD", ctypes.c_void_p),
("lpVideoPort", ctypes.c_void_p),
("dwFlags", wintypes.DWORD),
("lpddpfInputFormat", ctypes.c_void_p),
("lpddpfOutputFormats", ctypes.c_void_p),
("dwNumFormats", wintypes.DWORD),
("ddRVal", ctypes.c_int),
("GetVideoPortInputFormats", ctypes.c_void_p),
]#[repr(C)]
pub struct DD_GETVPORTOUTPUTFORMATDATA {
pub lpDD: *mut core::ffi::c_void,
pub lpVideoPort: *mut core::ffi::c_void,
pub dwFlags: u32,
pub lpddpfInputFormat: *mut core::ffi::c_void,
pub lpddpfOutputFormats: *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_GETVPORTOUTPUTFORMATDATA struct {
lpDD uintptr
lpVideoPort uintptr
dwFlags uint32
lpddpfInputFormat uintptr
lpddpfOutputFormats uintptr
dwNumFormats uint32
ddRVal int32
GetVideoPortInputFormats uintptr
}type
DD_GETVPORTOUTPUTFORMATDATA = record
lpDD: Pointer;
lpVideoPort: Pointer;
dwFlags: DWORD;
lpddpfInputFormat: Pointer;
lpddpfOutputFormats: Pointer;
dwNumFormats: DWORD;
ddRVal: Integer;
GetVideoPortInputFormats: Pointer;
end;const DD_GETVPORTOUTPUTFORMATDATA = extern struct {
lpDD: ?*anyopaque,
lpVideoPort: ?*anyopaque,
dwFlags: u32,
lpddpfInputFormat: ?*anyopaque,
lpddpfOutputFormats: ?*anyopaque,
dwNumFormats: u32,
ddRVal: i32,
GetVideoPortInputFormats: ?*anyopaque,
};type
DD_GETVPORTOUTPUTFORMATDATA {.bycopy.} = object
lpDD: pointer
lpVideoPort: pointer
dwFlags: uint32
lpddpfInputFormat: pointer
lpddpfOutputFormats: pointer
dwNumFormats: uint32
ddRVal: int32
GetVideoPortInputFormats: pointerstruct DD_GETVPORTOUTPUTFORMATDATA
{
void* lpDD;
void* lpVideoPort;
uint dwFlags;
void* lpddpfInputFormat;
void* lpddpfOutputFormats;
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_GETVPORTOUTPUTFORMATDATA サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 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 も可)
; lpddpfInputFormat : DDPIXELFORMAT* (+12, 4byte) varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; lpddpfOutputFormats : DDPIXELFORMAT* (+16, 4byte) varptr(st)+16 を基点に操作(4byte:入れ子/配列)
; dwNumFormats : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ddRVal : HRESULT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; GetVideoPortInputFormats : void* (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DD_GETVPORTOUTPUTFORMATDATA サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 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 も可)
; lpddpfInputFormat : DDPIXELFORMAT* (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; lpddpfOutputFormats : DDPIXELFORMAT* (+32, 8byte) varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; dwNumFormats : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ddRVal : HRESULT (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; GetVideoPortInputFormats : void* (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DD_GETVPORTOUTPUTFORMATDATA
#field intptr lpDD
#field intptr lpVideoPort
#field int dwFlags
#field intptr lpddpfInputFormat
#field intptr lpddpfOutputFormats
#field int dwNumFormats
#field int ddRVal
#field intptr GetVideoPortInputFormats
#endstruct
stdim st, DD_GETVPORTOUTPUTFORMATDATA ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags