ホーム › Media.KernelStreaming › KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS
KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ControlId | DWORD | 4 | +0 | +0 | 対象とするROI制御の識別子(フォーカス/露出など)。 |
| MaxNumberOfROIs | DWORD | 4 | +4 | +4 | 同時指定可能なROIの最大数を示す。 |
| Capability | ULONGLONG | 8 | +8 | +8 | ROI制御がサポートする機能を示す64ビットフラグ。 |
各言語での定義
#include <windows.h>
// KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS (x64 16 / x86 16 バイト)
typedef struct KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS {
DWORD ControlId;
DWORD MaxNumberOfROIs;
ULONGLONG Capability;
} KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS
{
public uint ControlId;
public uint MaxNumberOfROIs;
public ulong Capability;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS
Public ControlId As UInteger
Public MaxNumberOfROIs As UInteger
Public Capability As ULong
End Structureimport ctypes
from ctypes import wintypes
class KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS(ctypes.Structure):
_fields_ = [
("ControlId", wintypes.DWORD),
("MaxNumberOfROIs", wintypes.DWORD),
("Capability", ctypes.c_ulonglong),
]#[repr(C)]
pub struct KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS {
pub ControlId: u32,
pub MaxNumberOfROIs: u32,
pub Capability: u64,
}import "golang.org/x/sys/windows"
type KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS struct {
ControlId uint32
MaxNumberOfROIs uint32
Capability uint64
}type
KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS = record
ControlId: DWORD;
MaxNumberOfROIs: DWORD;
Capability: UInt64;
end;const KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS = extern struct {
ControlId: u32,
MaxNumberOfROIs: u32,
Capability: u64,
};type
KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS {.bycopy.} = object
ControlId: uint32
MaxNumberOfROIs: uint32
Capability: uint64struct KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS
{
uint ControlId;
uint MaxNumberOfROIs;
ulong Capability;
}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_ROI_CONFIGCAPS サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; ControlId : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; MaxNumberOfROIs : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Capability : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS
#field int ControlId
#field int MaxNumberOfROIs
#field int64 Capability
#endstruct
stdim st, KSCAMERA_EXTENDEDPROP_ROI_CONFIGCAPS ; NSTRUCT 変数を確保
st->ControlId = 100
mes "ControlId=" + st->ControlId