ホーム › Devices.Display › VIDEOPARAMETERS
VIDEOPARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Guid | GUID | 16 | +0 | +0 | このビデオパラメータ構造体の用途を識別するGUID。 |
| dwOffset | DWORD | 4 | +16 | +16 | 構造体内のオフセット値。バージョン管理や予約用に使用する。 |
| dwCommand | DWORD | 4 | +20 | +20 | 実行するコマンド種別(取得/設定など)を示す値。 |
| dwFlags | DWORD | 4 | +24 | +24 | 有効なフィールドや動作を制御するフラグの組み合わせ。 |
| dwMode | DWORD | 4 | +28 | +28 | ビデオ出力モードを示す値。TVモード等の選択に用いる。 |
| dwTVStandard | DWORD | 4 | +32 | +32 | TV方式(NTSC/PAL/SECAM等)を示す値。 |
| dwAvailableModes | DWORD | 4 | +36 | +36 | 利用可能な出力モードのビットマスク。 |
| dwAvailableTVStandard | DWORD | 4 | +40 | +40 | 利用可能なTV方式のビットマスク。 |
| dwFlickerFilter | DWORD | 4 | +44 | +44 | フリッカー(ちらつき)除去フィルターの強度。 |
| dwOverScanX | DWORD | 4 | +48 | +48 | 水平方向のオーバースキャン量。 |
| dwOverScanY | DWORD | 4 | +52 | +52 | 垂直方向のオーバースキャン量。 |
| dwMaxUnscaledX | DWORD | 4 | +56 | +56 | スケーリングなしで表示可能な最大水平サイズ。 |
| dwMaxUnscaledY | DWORD | 4 | +60 | +60 | スケーリングなしで表示可能な最大垂直サイズ。 |
| dwPositionX | DWORD | 4 | +64 | +64 | 表示画像の水平位置オフセット。 |
| dwPositionY | DWORD | 4 | +68 | +68 | 表示画像の垂直位置オフセット。 |
| dwBrightness | DWORD | 4 | +72 | +72 | 画面の明るさ調整値。 |
| dwContrast | DWORD | 4 | +76 | +76 | 画面のコントラスト調整値。 |
| dwCPType | DWORD | 4 | +80 | +80 | コピープロテクト(著作権保護)の種別。 |
| dwCPCommand | DWORD | 4 | +84 | +84 | コピープロテクト制御コマンド。 |
| dwCPStandard | DWORD | 4 | +88 | +88 | 対応するコピープロテクト規格(Macrovision等)。 |
| dwCPKey | DWORD | 4 | +92 | +92 | コピープロテクト用のキー値。 |
| bCP_APSTriggerBits | DWORD | 4 | +96 | +96 | APS(アナログ保護)トリガービット。保護レベルを指定する。 |
| bOEMCopyProtection | BYTE | 256 | +100 | +100 | OEM独自のコピープロテクト設定(可変長バイト配列)。 |
各言語での定義
#include <windows.h>
// VIDEOPARAMETERS (x64 356 / x86 356 バイト)
typedef struct VIDEOPARAMETERS {
GUID Guid;
DWORD dwOffset;
DWORD dwCommand;
DWORD dwFlags;
DWORD dwMode;
DWORD dwTVStandard;
DWORD dwAvailableModes;
DWORD dwAvailableTVStandard;
DWORD dwFlickerFilter;
DWORD dwOverScanX;
DWORD dwOverScanY;
DWORD dwMaxUnscaledX;
DWORD dwMaxUnscaledY;
DWORD dwPositionX;
DWORD dwPositionY;
DWORD dwBrightness;
DWORD dwContrast;
DWORD dwCPType;
DWORD dwCPCommand;
DWORD dwCPStandard;
DWORD dwCPKey;
DWORD bCP_APSTriggerBits;
BYTE bOEMCopyProtection[256];
} VIDEOPARAMETERS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VIDEOPARAMETERS
{
public Guid Guid;
public uint dwOffset;
public uint dwCommand;
public uint dwFlags;
public uint dwMode;
public uint dwTVStandard;
public uint dwAvailableModes;
public uint dwAvailableTVStandard;
public uint dwFlickerFilter;
public uint dwOverScanX;
public uint dwOverScanY;
public uint dwMaxUnscaledX;
public uint dwMaxUnscaledY;
public uint dwPositionX;
public uint dwPositionY;
public uint dwBrightness;
public uint dwContrast;
public uint dwCPType;
public uint dwCPCommand;
public uint dwCPStandard;
public uint dwCPKey;
public uint bCP_APSTriggerBits;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public byte[] bOEMCopyProtection;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VIDEOPARAMETERS
Public Guid As Guid
Public dwOffset As UInteger
Public dwCommand As UInteger
Public dwFlags As UInteger
Public dwMode As UInteger
Public dwTVStandard As UInteger
Public dwAvailableModes As UInteger
Public dwAvailableTVStandard As UInteger
Public dwFlickerFilter As UInteger
Public dwOverScanX As UInteger
Public dwOverScanY As UInteger
Public dwMaxUnscaledX As UInteger
Public dwMaxUnscaledY As UInteger
Public dwPositionX As UInteger
Public dwPositionY As UInteger
Public dwBrightness As UInteger
Public dwContrast As UInteger
Public dwCPType As UInteger
Public dwCPCommand As UInteger
Public dwCPStandard As UInteger
Public dwCPKey As UInteger
Public bCP_APSTriggerBits As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=256)> Public bOEMCopyProtection() As Byte
End Structureimport ctypes
from ctypes import wintypes
class VIDEOPARAMETERS(ctypes.Structure):
_fields_ = [
("Guid", GUID),
("dwOffset", wintypes.DWORD),
("dwCommand", wintypes.DWORD),
("dwFlags", wintypes.DWORD),
("dwMode", wintypes.DWORD),
("dwTVStandard", wintypes.DWORD),
("dwAvailableModes", wintypes.DWORD),
("dwAvailableTVStandard", wintypes.DWORD),
("dwFlickerFilter", wintypes.DWORD),
("dwOverScanX", wintypes.DWORD),
("dwOverScanY", wintypes.DWORD),
("dwMaxUnscaledX", wintypes.DWORD),
("dwMaxUnscaledY", wintypes.DWORD),
("dwPositionX", wintypes.DWORD),
("dwPositionY", wintypes.DWORD),
("dwBrightness", wintypes.DWORD),
("dwContrast", wintypes.DWORD),
("dwCPType", wintypes.DWORD),
("dwCPCommand", wintypes.DWORD),
("dwCPStandard", wintypes.DWORD),
("dwCPKey", wintypes.DWORD),
("bCP_APSTriggerBits", wintypes.DWORD),
("bOEMCopyProtection", ctypes.c_ubyte * 256),
]#[repr(C)]
pub struct VIDEOPARAMETERS {
pub Guid: GUID,
pub dwOffset: u32,
pub dwCommand: u32,
pub dwFlags: u32,
pub dwMode: u32,
pub dwTVStandard: u32,
pub dwAvailableModes: u32,
pub dwAvailableTVStandard: u32,
pub dwFlickerFilter: u32,
pub dwOverScanX: u32,
pub dwOverScanY: u32,
pub dwMaxUnscaledX: u32,
pub dwMaxUnscaledY: u32,
pub dwPositionX: u32,
pub dwPositionY: u32,
pub dwBrightness: u32,
pub dwContrast: u32,
pub dwCPType: u32,
pub dwCPCommand: u32,
pub dwCPStandard: u32,
pub dwCPKey: u32,
pub bCP_APSTriggerBits: u32,
pub bOEMCopyProtection: [u8; 256],
}import "golang.org/x/sys/windows"
type VIDEOPARAMETERS struct {
Guid windows.GUID
dwOffset uint32
dwCommand uint32
dwFlags uint32
dwMode uint32
dwTVStandard uint32
dwAvailableModes uint32
dwAvailableTVStandard uint32
dwFlickerFilter uint32
dwOverScanX uint32
dwOverScanY uint32
dwMaxUnscaledX uint32
dwMaxUnscaledY uint32
dwPositionX uint32
dwPositionY uint32
dwBrightness uint32
dwContrast uint32
dwCPType uint32
dwCPCommand uint32
dwCPStandard uint32
dwCPKey uint32
bCP_APSTriggerBits uint32
bOEMCopyProtection [256]byte
}type
VIDEOPARAMETERS = record
Guid: TGUID;
dwOffset: DWORD;
dwCommand: DWORD;
dwFlags: DWORD;
dwMode: DWORD;
dwTVStandard: DWORD;
dwAvailableModes: DWORD;
dwAvailableTVStandard: DWORD;
dwFlickerFilter: DWORD;
dwOverScanX: DWORD;
dwOverScanY: DWORD;
dwMaxUnscaledX: DWORD;
dwMaxUnscaledY: DWORD;
dwPositionX: DWORD;
dwPositionY: DWORD;
dwBrightness: DWORD;
dwContrast: DWORD;
dwCPType: DWORD;
dwCPCommand: DWORD;
dwCPStandard: DWORD;
dwCPKey: DWORD;
bCP_APSTriggerBits: DWORD;
bOEMCopyProtection: array[0..255] of Byte;
end;const VIDEOPARAMETERS = extern struct {
Guid: GUID,
dwOffset: u32,
dwCommand: u32,
dwFlags: u32,
dwMode: u32,
dwTVStandard: u32,
dwAvailableModes: u32,
dwAvailableTVStandard: u32,
dwFlickerFilter: u32,
dwOverScanX: u32,
dwOverScanY: u32,
dwMaxUnscaledX: u32,
dwMaxUnscaledY: u32,
dwPositionX: u32,
dwPositionY: u32,
dwBrightness: u32,
dwContrast: u32,
dwCPType: u32,
dwCPCommand: u32,
dwCPStandard: u32,
dwCPKey: u32,
bCP_APSTriggerBits: u32,
bOEMCopyProtection: [256]u8,
};type
VIDEOPARAMETERS {.bycopy.} = object
Guid: GUID
dwOffset: uint32
dwCommand: uint32
dwFlags: uint32
dwMode: uint32
dwTVStandard: uint32
dwAvailableModes: uint32
dwAvailableTVStandard: uint32
dwFlickerFilter: uint32
dwOverScanX: uint32
dwOverScanY: uint32
dwMaxUnscaledX: uint32
dwMaxUnscaledY: uint32
dwPositionX: uint32
dwPositionY: uint32
dwBrightness: uint32
dwContrast: uint32
dwCPType: uint32
dwCPCommand: uint32
dwCPStandard: uint32
dwCPKey: uint32
bCP_APSTriggerBits: uint32
bOEMCopyProtection: array[256, uint8]struct VIDEOPARAMETERS
{
GUID Guid;
uint dwOffset;
uint dwCommand;
uint dwFlags;
uint dwMode;
uint dwTVStandard;
uint dwAvailableModes;
uint dwAvailableTVStandard;
uint dwFlickerFilter;
uint dwOverScanX;
uint dwOverScanY;
uint dwMaxUnscaledX;
uint dwMaxUnscaledY;
uint dwPositionX;
uint dwPositionY;
uint dwBrightness;
uint dwContrast;
uint dwCPType;
uint dwCPCommand;
uint dwCPStandard;
uint dwCPKey;
uint bCP_APSTriggerBits;
ubyte[256] bOEMCopyProtection;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VIDEOPARAMETERS サイズ: 356 バイト(x64)
dim st, 89 ; 4byte整数×89(構造体サイズ 356 / 4 切り上げ)
; Guid : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; dwOffset : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwCommand : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwFlags : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwMode : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwTVStandard : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; dwAvailableModes : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dwAvailableTVStandard : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; dwFlickerFilter : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; dwOverScanX : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; dwOverScanY : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; dwMaxUnscaledX : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; dwMaxUnscaledY : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; dwPositionX : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; dwPositionY : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; dwBrightness : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; dwContrast : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; dwCPType : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; dwCPCommand : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; dwCPStandard : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; dwCPKey : DWORD (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; bCP_APSTriggerBits : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; bOEMCopyProtection : BYTE (+100, 256byte) varptr(st)+100 を基点に操作(256byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global VIDEOPARAMETERS
#field GUID Guid
#field int dwOffset
#field int dwCommand
#field int dwFlags
#field int dwMode
#field int dwTVStandard
#field int dwAvailableModes
#field int dwAvailableTVStandard
#field int dwFlickerFilter
#field int dwOverScanX
#field int dwOverScanY
#field int dwMaxUnscaledX
#field int dwMaxUnscaledY
#field int dwPositionX
#field int dwPositionY
#field int dwBrightness
#field int dwContrast
#field int dwCPType
#field int dwCPCommand
#field int dwCPStandard
#field int dwCPKey
#field int bCP_APSTriggerBits
#field byte bOEMCopyProtection 256
#endstruct
stdim st, VIDEOPARAMETERS ; NSTRUCT 変数を確保
st->dwOffset = 100
mes "dwOffset=" + st->dwOffset