Win32 API 日本語リファレンス
ホームMedia.KernelStreaming › KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS

KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS

構造体
サイズx64: 40 バイト / x86: 40 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
ResolutionXINT4+0+0対象解像度の幅をピクセル単位で示す。
ResolutionYINT4+4+4対象解像度の高さをピクセル単位で示す。
PorchTopINT4+8+8ウィンドウ移動可能領域の上側マージン(ポーチ)を示す。
PorchLeftINT4+12+12ウィンドウ移動可能領域の左側マージン(ポーチ)を示す。
PorchBottomINT4+16+16ウィンドウ移動可能領域の下側マージン(ポーチ)を示す。
PorchRightINT4+20+20ウィンドウ移動可能領域の右側マージン(ポーチ)を示す。
NonUpscalingWindowSizeINT4+24+24拡大処理を伴わない最大ウィンドウサイズを示す。
MinWindowSizeINT4+28+28設定可能な最小ウィンドウサイズを示す。
MaxWindowSizeINT4+32+32設定可能な最大ウィンドウサイズを示す。
ReservedINT4+36+36予約フィールド。将来の拡張用で通常は0を設定する。

各言語での定義

#include <windows.h>

// KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS  (x64 40 / x86 40 バイト)
typedef struct KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS {
    INT ResolutionX;
    INT ResolutionY;
    INT PorchTop;
    INT PorchLeft;
    INT PorchBottom;
    INT PorchRight;
    INT NonUpscalingWindowSize;
    INT MinWindowSize;
    INT MaxWindowSize;
    INT Reserved;
} KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS
{
    public int ResolutionX;
    public int ResolutionY;
    public int PorchTop;
    public int PorchLeft;
    public int PorchBottom;
    public int PorchRight;
    public int NonUpscalingWindowSize;
    public int MinWindowSize;
    public int MaxWindowSize;
    public int Reserved;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS
    Public ResolutionX As Integer
    Public ResolutionY As Integer
    Public PorchTop As Integer
    Public PorchLeft As Integer
    Public PorchBottom As Integer
    Public PorchRight As Integer
    Public NonUpscalingWindowSize As Integer
    Public MinWindowSize As Integer
    Public MaxWindowSize As Integer
    Public Reserved As Integer
End Structure
import ctypes
from ctypes import wintypes

class KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS(ctypes.Structure):
    _fields_ = [
        ("ResolutionX", ctypes.c_int),
        ("ResolutionY", ctypes.c_int),
        ("PorchTop", ctypes.c_int),
        ("PorchLeft", ctypes.c_int),
        ("PorchBottom", ctypes.c_int),
        ("PorchRight", ctypes.c_int),
        ("NonUpscalingWindowSize", ctypes.c_int),
        ("MinWindowSize", ctypes.c_int),
        ("MaxWindowSize", ctypes.c_int),
        ("Reserved", ctypes.c_int),
    ]
#[repr(C)]
pub struct KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS {
    pub ResolutionX: i32,
    pub ResolutionY: i32,
    pub PorchTop: i32,
    pub PorchLeft: i32,
    pub PorchBottom: i32,
    pub PorchRight: i32,
    pub NonUpscalingWindowSize: i32,
    pub MinWindowSize: i32,
    pub MaxWindowSize: i32,
    pub Reserved: i32,
}
import "golang.org/x/sys/windows"

type KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS struct {
	ResolutionX int32
	ResolutionY int32
	PorchTop int32
	PorchLeft int32
	PorchBottom int32
	PorchRight int32
	NonUpscalingWindowSize int32
	MinWindowSize int32
	MaxWindowSize int32
	Reserved int32
}
type
  KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS = record
    ResolutionX: Integer;
    ResolutionY: Integer;
    PorchTop: Integer;
    PorchLeft: Integer;
    PorchBottom: Integer;
    PorchRight: Integer;
    NonUpscalingWindowSize: Integer;
    MinWindowSize: Integer;
    MaxWindowSize: Integer;
    Reserved: Integer;
  end;
const KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS = extern struct {
    ResolutionX: i32,
    ResolutionY: i32,
    PorchTop: i32,
    PorchLeft: i32,
    PorchBottom: i32,
    PorchRight: i32,
    NonUpscalingWindowSize: i32,
    MinWindowSize: i32,
    MaxWindowSize: i32,
    Reserved: i32,
};
type
  KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS {.bycopy.} = object
    ResolutionX: int32
    ResolutionY: int32
    PorchTop: int32
    PorchLeft: int32
    PorchBottom: int32
    PorchRight: int32
    NonUpscalingWindowSize: int32
    MinWindowSize: int32
    MaxWindowSize: int32
    Reserved: int32
struct KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS
{
    int ResolutionX;
    int ResolutionY;
    int PorchTop;
    int PorchLeft;
    int PorchBottom;
    int PorchRight;
    int NonUpscalingWindowSize;
    int MinWindowSize;
    int MaxWindowSize;
    int Reserved;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS サイズ: 40 バイト(x64)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; ResolutionX : INT (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; ResolutionY : INT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; PorchTop : INT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; PorchLeft : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; PorchBottom : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; PorchRight : INT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; NonUpscalingWindowSize : INT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; MinWindowSize : INT (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; MaxWindowSize : INT (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; Reserved : INT (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS
    #field int ResolutionX
    #field int ResolutionY
    #field int PorchTop
    #field int PorchLeft
    #field int PorchBottom
    #field int PorchRight
    #field int NonUpscalingWindowSize
    #field int MinWindowSize
    #field int MaxWindowSize
    #field int Reserved
#endstruct

stdim st, KSCAMERA_EXTENDEDPROP_DIGITALWINDOW_CONFIGCAPS        ; NSTRUCT 変数を確保
st->ResolutionX = 100
mes "ResolutionX=" + st->ResolutionX