ホーム › Media.KernelStreaming › KSCAMERA_EXTENDEDPROP_PROFILE
KSCAMERA_EXTENDEDPROP_PROFILE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ProfileId | GUID | 16 | +0 | +0 | カメラプロファイルを識別するGUID。 |
| Index | DWORD | 4 | +16 | +16 | 同一プロファイルID内のインデックスを示す。 |
| Reserved | DWORD | 4 | +20 | +20 | 予約フィールド。将来の拡張用で通常は0を設定する。 |
各言語での定義
#include <windows.h>
// KSCAMERA_EXTENDEDPROP_PROFILE (x64 24 / x86 24 バイト)
typedef struct KSCAMERA_EXTENDEDPROP_PROFILE {
GUID ProfileId;
DWORD Index;
DWORD Reserved;
} KSCAMERA_EXTENDEDPROP_PROFILE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSCAMERA_EXTENDEDPROP_PROFILE
{
public Guid ProfileId;
public uint Index;
public uint Reserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSCAMERA_EXTENDEDPROP_PROFILE
Public ProfileId As Guid
Public Index As UInteger
Public Reserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class KSCAMERA_EXTENDEDPROP_PROFILE(ctypes.Structure):
_fields_ = [
("ProfileId", GUID),
("Index", wintypes.DWORD),
("Reserved", wintypes.DWORD),
]#[repr(C)]
pub struct KSCAMERA_EXTENDEDPROP_PROFILE {
pub ProfileId: GUID,
pub Index: u32,
pub Reserved: u32,
}import "golang.org/x/sys/windows"
type KSCAMERA_EXTENDEDPROP_PROFILE struct {
ProfileId windows.GUID
Index uint32
Reserved uint32
}type
KSCAMERA_EXTENDEDPROP_PROFILE = record
ProfileId: TGUID;
Index: DWORD;
Reserved: DWORD;
end;const KSCAMERA_EXTENDEDPROP_PROFILE = extern struct {
ProfileId: GUID,
Index: u32,
Reserved: u32,
};type
KSCAMERA_EXTENDEDPROP_PROFILE {.bycopy.} = object
ProfileId: GUID
Index: uint32
Reserved: uint32struct KSCAMERA_EXTENDEDPROP_PROFILE
{
GUID ProfileId;
uint Index;
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_PROFILE サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; ProfileId : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; Index : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Reserved : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global KSCAMERA_EXTENDEDPROP_PROFILE
#field GUID ProfileId
#field int Index
#field int Reserved
#endstruct
stdim st, KSCAMERA_EXTENDEDPROP_PROFILE ; NSTRUCT 変数を確保
st->Index = 100
mes "Index=" + st->Index