ホーム › Graphics.DirectDraw › DDNONLOCALVIDMEMCAPS
DDNONLOCALVIDMEMCAPS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSize | DWORD | 4 | +0 | +0 | 構造体サイズ(バイト数)。呼び出し前に設定する。 |
| dwNLVBCaps | DWORD | 4 | +4 | +4 | 非ローカルビデオメモリBltの対応能力フラグを示す。 |
| dwNLVBCaps2 | DWORD | 4 | +8 | +8 | 非ローカルビデオBltの追加能力フラグ(その2)を示す。 |
| dwNLVBCKeyCaps | DWORD | 4 | +12 | +12 | 非ローカルビデオBltのカラーキー対応フラグを示す。 |
| dwNLVBFXCaps | DWORD | 4 | +16 | +16 | 非ローカルビデオBltの効果対応フラグを示す。 |
| dwNLVBRops | DWORD | 32 | +20 | +20 | 非ローカルビデオBltで対応するROP集合を示す。 |
各言語での定義
#include <windows.h>
// DDNONLOCALVIDMEMCAPS (x64 52 / x86 52 バイト)
typedef struct DDNONLOCALVIDMEMCAPS {
DWORD dwSize;
DWORD dwNLVBCaps;
DWORD dwNLVBCaps2;
DWORD dwNLVBCKeyCaps;
DWORD dwNLVBFXCaps;
DWORD dwNLVBRops[8];
} DDNONLOCALVIDMEMCAPS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDNONLOCALVIDMEMCAPS
{
public uint dwSize;
public uint dwNLVBCaps;
public uint dwNLVBCaps2;
public uint dwNLVBCKeyCaps;
public uint dwNLVBFXCaps;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public uint[] dwNLVBRops;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDNONLOCALVIDMEMCAPS
Public dwSize As UInteger
Public dwNLVBCaps As UInteger
Public dwNLVBCaps2 As UInteger
Public dwNLVBCKeyCaps As UInteger
Public dwNLVBFXCaps As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public dwNLVBRops() As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DDNONLOCALVIDMEMCAPS(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("dwNLVBCaps", wintypes.DWORD),
("dwNLVBCaps2", wintypes.DWORD),
("dwNLVBCKeyCaps", wintypes.DWORD),
("dwNLVBFXCaps", wintypes.DWORD),
("dwNLVBRops", wintypes.DWORD * 8),
]#[repr(C)]
pub struct DDNONLOCALVIDMEMCAPS {
pub dwSize: u32,
pub dwNLVBCaps: u32,
pub dwNLVBCaps2: u32,
pub dwNLVBCKeyCaps: u32,
pub dwNLVBFXCaps: u32,
pub dwNLVBRops: [u32; 8],
}import "golang.org/x/sys/windows"
type DDNONLOCALVIDMEMCAPS struct {
dwSize uint32
dwNLVBCaps uint32
dwNLVBCaps2 uint32
dwNLVBCKeyCaps uint32
dwNLVBFXCaps uint32
dwNLVBRops [8]uint32
}type
DDNONLOCALVIDMEMCAPS = record
dwSize: DWORD;
dwNLVBCaps: DWORD;
dwNLVBCaps2: DWORD;
dwNLVBCKeyCaps: DWORD;
dwNLVBFXCaps: DWORD;
dwNLVBRops: array[0..7] of DWORD;
end;const DDNONLOCALVIDMEMCAPS = extern struct {
dwSize: u32,
dwNLVBCaps: u32,
dwNLVBCaps2: u32,
dwNLVBCKeyCaps: u32,
dwNLVBFXCaps: u32,
dwNLVBRops: [8]u32,
};type
DDNONLOCALVIDMEMCAPS {.bycopy.} = object
dwSize: uint32
dwNLVBCaps: uint32
dwNLVBCaps2: uint32
dwNLVBCKeyCaps: uint32
dwNLVBFXCaps: uint32
dwNLVBRops: array[8, uint32]struct DDNONLOCALVIDMEMCAPS
{
uint dwSize;
uint dwNLVBCaps;
uint dwNLVBCaps2;
uint dwNLVBCKeyCaps;
uint dwNLVBFXCaps;
uint[8] dwNLVBRops;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DDNONLOCALVIDMEMCAPS サイズ: 52 バイト(x64)
dim st, 13 ; 4byte整数×13(構造体サイズ 52 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwNLVBCaps : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwNLVBCaps2 : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwNLVBCKeyCaps : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwNLVBFXCaps : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwNLVBRops : DWORD (+20, 32byte) varptr(st)+20 を基点に操作(32byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DDNONLOCALVIDMEMCAPS
#field int dwSize
#field int dwNLVBCaps
#field int dwNLVBCaps2
#field int dwNLVBCKeyCaps
#field int dwNLVBFXCaps
#field int dwNLVBRops 8
#endstruct
stdim st, DDNONLOCALVIDMEMCAPS ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize