ホーム › Devices.Display › VIDEO_POINTER_CAPABILITIES
VIDEO_POINTER_CAPABILITIES
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Flags | DWORD | 4 | +0 | +0 | ハードウェアポインタの機能フラグ(VIDEO_MODE_*)。 |
| MaxWidth | DWORD | 4 | +4 | +4 | サポートされるポインタの最大幅。 |
| MaxHeight | DWORD | 4 | +8 | +8 | サポートされるポインタの最大高さ。 |
| HWPtrBitmapStart | DWORD | 4 | +12 | +12 | ハードウェアポインタビットマップの開始オフセット。 |
| HWPtrBitmapEnd | DWORD | 4 | +16 | +16 | ハードウェアポインタビットマップの終了オフセット。 |
各言語での定義
#include <windows.h>
// VIDEO_POINTER_CAPABILITIES (x64 20 / x86 20 バイト)
typedef struct VIDEO_POINTER_CAPABILITIES {
DWORD Flags;
DWORD MaxWidth;
DWORD MaxHeight;
DWORD HWPtrBitmapStart;
DWORD HWPtrBitmapEnd;
} VIDEO_POINTER_CAPABILITIES;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VIDEO_POINTER_CAPABILITIES
{
public uint Flags;
public uint MaxWidth;
public uint MaxHeight;
public uint HWPtrBitmapStart;
public uint HWPtrBitmapEnd;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VIDEO_POINTER_CAPABILITIES
Public Flags As UInteger
Public MaxWidth As UInteger
Public MaxHeight As UInteger
Public HWPtrBitmapStart As UInteger
Public HWPtrBitmapEnd As UInteger
End Structureimport ctypes
from ctypes import wintypes
class VIDEO_POINTER_CAPABILITIES(ctypes.Structure):
_fields_ = [
("Flags", wintypes.DWORD),
("MaxWidth", wintypes.DWORD),
("MaxHeight", wintypes.DWORD),
("HWPtrBitmapStart", wintypes.DWORD),
("HWPtrBitmapEnd", wintypes.DWORD),
]#[repr(C)]
pub struct VIDEO_POINTER_CAPABILITIES {
pub Flags: u32,
pub MaxWidth: u32,
pub MaxHeight: u32,
pub HWPtrBitmapStart: u32,
pub HWPtrBitmapEnd: u32,
}import "golang.org/x/sys/windows"
type VIDEO_POINTER_CAPABILITIES struct {
Flags uint32
MaxWidth uint32
MaxHeight uint32
HWPtrBitmapStart uint32
HWPtrBitmapEnd uint32
}type
VIDEO_POINTER_CAPABILITIES = record
Flags: DWORD;
MaxWidth: DWORD;
MaxHeight: DWORD;
HWPtrBitmapStart: DWORD;
HWPtrBitmapEnd: DWORD;
end;const VIDEO_POINTER_CAPABILITIES = extern struct {
Flags: u32,
MaxWidth: u32,
MaxHeight: u32,
HWPtrBitmapStart: u32,
HWPtrBitmapEnd: u32,
};type
VIDEO_POINTER_CAPABILITIES {.bycopy.} = object
Flags: uint32
MaxWidth: uint32
MaxHeight: uint32
HWPtrBitmapStart: uint32
HWPtrBitmapEnd: uint32struct VIDEO_POINTER_CAPABILITIES
{
uint Flags;
uint MaxWidth;
uint MaxHeight;
uint HWPtrBitmapStart;
uint HWPtrBitmapEnd;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VIDEO_POINTER_CAPABILITIES サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; Flags : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; MaxWidth : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; MaxHeight : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; HWPtrBitmapStart : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; HWPtrBitmapEnd : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global VIDEO_POINTER_CAPABILITIES
#field int Flags
#field int MaxWidth
#field int MaxHeight
#field int HWPtrBitmapStart
#field int HWPtrBitmapEnd
#endstruct
stdim st, VIDEO_POINTER_CAPABILITIES ; NSTRUCT 変数を確保
st->Flags = 100
mes "Flags=" + st->Flags