ホーム › Media.MediaFoundation › MF_CAMERA_CONTROL_RANGE_INFO
MF_CAMERA_CONTROL_RANGE_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| minValue | INT | 4 | +0 | +0 | カメラ制御値の最小値。 |
| maxValue | INT | 4 | +4 | +4 | カメラ制御値の最大値。 |
| stepValue | INT | 4 | +8 | +8 | 値の刻み幅(増分単位)。 |
| defaultValue | INT | 4 | +12 | +12 | 既定値。 |
各言語での定義
#include <windows.h>
// MF_CAMERA_CONTROL_RANGE_INFO (x64 16 / x86 16 バイト)
typedef struct MF_CAMERA_CONTROL_RANGE_INFO {
INT minValue;
INT maxValue;
INT stepValue;
INT defaultValue;
} MF_CAMERA_CONTROL_RANGE_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MF_CAMERA_CONTROL_RANGE_INFO
{
public int minValue;
public int maxValue;
public int stepValue;
public int defaultValue;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MF_CAMERA_CONTROL_RANGE_INFO
Public minValue As Integer
Public maxValue As Integer
Public stepValue As Integer
Public defaultValue As Integer
End Structureimport ctypes
from ctypes import wintypes
class MF_CAMERA_CONTROL_RANGE_INFO(ctypes.Structure):
_fields_ = [
("minValue", ctypes.c_int),
("maxValue", ctypes.c_int),
("stepValue", ctypes.c_int),
("defaultValue", ctypes.c_int),
]#[repr(C)]
pub struct MF_CAMERA_CONTROL_RANGE_INFO {
pub minValue: i32,
pub maxValue: i32,
pub stepValue: i32,
pub defaultValue: i32,
}import "golang.org/x/sys/windows"
type MF_CAMERA_CONTROL_RANGE_INFO struct {
minValue int32
maxValue int32
stepValue int32
defaultValue int32
}type
MF_CAMERA_CONTROL_RANGE_INFO = record
minValue: Integer;
maxValue: Integer;
stepValue: Integer;
defaultValue: Integer;
end;const MF_CAMERA_CONTROL_RANGE_INFO = extern struct {
minValue: i32,
maxValue: i32,
stepValue: i32,
defaultValue: i32,
};type
MF_CAMERA_CONTROL_RANGE_INFO {.bycopy.} = object
minValue: int32
maxValue: int32
stepValue: int32
defaultValue: int32struct MF_CAMERA_CONTROL_RANGE_INFO
{
int minValue;
int maxValue;
int stepValue;
int defaultValue;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MF_CAMERA_CONTROL_RANGE_INFO サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; minValue : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; maxValue : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; stepValue : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; defaultValue : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MF_CAMERA_CONTROL_RANGE_INFO
#field int minValue
#field int maxValue
#field int stepValue
#field int defaultValue
#endstruct
stdim st, MF_CAMERA_CONTROL_RANGE_INFO ; NSTRUCT 変数を確保
st->minValue = 100
mes "minValue=" + st->minValue