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

KSCAMERA_EXTENDEDPROP_EVCOMPENSATION

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

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

フィールド

フィールドサイズx64x86説明
ModeDWORD4+0+0露出補正の動作モードを示す値(ステップ単位など)。
MinINT4+4+4露出補正の最小値を示す。
MaxINT4+8+8露出補正の最大値を示す。
ValueINT4+12+12現在の露出補正値(EV)を示す。
ReservedULONGLONG8+16+16予約フィールド。将来の拡張用で通常は0を設定する。

各言語での定義

#include <windows.h>

// KSCAMERA_EXTENDEDPROP_EVCOMPENSATION  (x64 24 / x86 24 バイト)
typedef struct KSCAMERA_EXTENDEDPROP_EVCOMPENSATION {
    DWORD Mode;
    INT Min;
    INT Max;
    INT Value;
    ULONGLONG Reserved;
} KSCAMERA_EXTENDEDPROP_EVCOMPENSATION;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSCAMERA_EXTENDEDPROP_EVCOMPENSATION
{
    public uint Mode;
    public int Min;
    public int Max;
    public int Value;
    public ulong Reserved;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSCAMERA_EXTENDEDPROP_EVCOMPENSATION
    Public Mode As UInteger
    Public Min As Integer
    Public Max As Integer
    Public Value As Integer
    Public Reserved As ULong
End Structure
import ctypes
from ctypes import wintypes

class KSCAMERA_EXTENDEDPROP_EVCOMPENSATION(ctypes.Structure):
    _fields_ = [
        ("Mode", wintypes.DWORD),
        ("Min", ctypes.c_int),
        ("Max", ctypes.c_int),
        ("Value", ctypes.c_int),
        ("Reserved", ctypes.c_ulonglong),
    ]
#[repr(C)]
pub struct KSCAMERA_EXTENDEDPROP_EVCOMPENSATION {
    pub Mode: u32,
    pub Min: i32,
    pub Max: i32,
    pub Value: i32,
    pub Reserved: u64,
}
import "golang.org/x/sys/windows"

type KSCAMERA_EXTENDEDPROP_EVCOMPENSATION struct {
	Mode uint32
	Min int32
	Max int32
	Value int32
	Reserved uint64
}
type
  KSCAMERA_EXTENDEDPROP_EVCOMPENSATION = record
    Mode: DWORD;
    Min: Integer;
    Max: Integer;
    Value: Integer;
    Reserved: UInt64;
  end;
const KSCAMERA_EXTENDEDPROP_EVCOMPENSATION = extern struct {
    Mode: u32,
    Min: i32,
    Max: i32,
    Value: i32,
    Reserved: u64,
};
type
  KSCAMERA_EXTENDEDPROP_EVCOMPENSATION {.bycopy.} = object
    Mode: uint32
    Min: int32
    Max: int32
    Value: int32
    Reserved: uint64
struct KSCAMERA_EXTENDEDPROP_EVCOMPENSATION
{
    uint Mode;
    int Min;
    int Max;
    int Value;
    ulong 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_EVCOMPENSATION サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; Mode : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Min : INT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; Max : INT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; Value : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; Reserved : ULONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSCAMERA_EXTENDEDPROP_EVCOMPENSATION
    #field int Mode
    #field int Min
    #field int Max
    #field int Value
    #field int64 Reserved
#endstruct

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