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

KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS

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

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

フィールド

フィールドサイズx64x86説明
DefaultDiagonalFieldOfViewInDegreesWORD2+0+0既定の対角視野角を度単位で示す。
DiscreteFoVStopsCountWORD2+2+2離散的に選択可能な視野角段階の数を示す。
DiscreteFoVStopsWORD720+4+4選択可能な視野角段階値(可変長配列の先頭)。
ReservedDWORD4+724+724予約フィールド。将来の拡張用で通常は0を設定する。

各言語での定義

#include <windows.h>

// KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS  (x64 728 / x86 728 バイト)
typedef struct KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS {
    WORD DefaultDiagonalFieldOfViewInDegrees;
    WORD DiscreteFoVStopsCount;
    WORD DiscreteFoVStops[360];
    DWORD Reserved;
} KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS
{
    public ushort DefaultDiagonalFieldOfViewInDegrees;
    public ushort DiscreteFoVStopsCount;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 360)] public ushort[] DiscreteFoVStops;
    public uint Reserved;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS
    Public DefaultDiagonalFieldOfViewInDegrees As UShort
    Public DiscreteFoVStopsCount As UShort
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=360)> Public DiscreteFoVStops() As UShort
    Public Reserved As UInteger
End Structure
import ctypes
from ctypes import wintypes

class KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS(ctypes.Structure):
    _fields_ = [
        ("DefaultDiagonalFieldOfViewInDegrees", ctypes.c_ushort),
        ("DiscreteFoVStopsCount", ctypes.c_ushort),
        ("DiscreteFoVStops", ctypes.c_ushort * 360),
        ("Reserved", wintypes.DWORD),
    ]
#[repr(C)]
pub struct KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS {
    pub DefaultDiagonalFieldOfViewInDegrees: u16,
    pub DiscreteFoVStopsCount: u16,
    pub DiscreteFoVStops: [u16; 360],
    pub Reserved: u32,
}
import "golang.org/x/sys/windows"

type KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS struct {
	DefaultDiagonalFieldOfViewInDegrees uint16
	DiscreteFoVStopsCount uint16
	DiscreteFoVStops [360]uint16
	Reserved uint32
}
type
  KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS = record
    DefaultDiagonalFieldOfViewInDegrees: Word;
    DiscreteFoVStopsCount: Word;
    DiscreteFoVStops: array[0..359] of Word;
    Reserved: DWORD;
  end;
const KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS = extern struct {
    DefaultDiagonalFieldOfViewInDegrees: u16,
    DiscreteFoVStopsCount: u16,
    DiscreteFoVStops: [360]u16,
    Reserved: u32,
};
type
  KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS {.bycopy.} = object
    DefaultDiagonalFieldOfViewInDegrees: uint16
    DiscreteFoVStopsCount: uint16
    DiscreteFoVStops: array[360, uint16]
    Reserved: uint32
struct KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS
{
    ushort DefaultDiagonalFieldOfViewInDegrees;
    ushort DiscreteFoVStopsCount;
    ushort[360] DiscreteFoVStops;
    uint 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_FIELDOFVIEW2_CONFIGCAPS サイズ: 728 バイト(x64)
dim st, 182    ; 4byte整数×182(構造体サイズ 728 / 4 切り上げ)
; DefaultDiagonalFieldOfViewInDegrees : WORD (+0, 2byte)  wpoke st,0,値  /  値 = wpeek(st,0)
; DiscreteFoVStopsCount : WORD (+2, 2byte)  wpoke st,2,値  /  値 = wpeek(st,2)
; DiscreteFoVStops : WORD (+4, 720byte)  varptr(st)+4 を基点に操作(720byte:入れ子/配列)
; Reserved : DWORD (+724, 4byte)  st.181 = 値  /  値 = st.181   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSCAMERA_EXTENDEDPROP_FIELDOFVIEW2_CONFIGCAPS
    #field short DefaultDiagonalFieldOfViewInDegrees
    #field short DiscreteFoVStopsCount
    #field short DiscreteFoVStops 360
    #field int Reserved
#endstruct

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