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

KSCAMERA_PROFILE_CONCURRENCYINFO

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

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

フィールド

フィールドサイズx64x86説明
ReferenceGuidGUID16+0+0同時実行の基準となるプロファイルを識別するGUID。
ReservedDWORD4+16+16予約フィールド。将来の拡張用で通常は0を設定する。
ProfileCountDWORD4+20+20Profiles配列の要素数を示す。
ProfilesKSCAMERA_PROFILE_INFO*8/4+24+24同時利用可能なプロファイル情報の配列KSCAMERA_PROFILE_INFOへのポインタ。

各言語での定義

#include <windows.h>

// KSCAMERA_PROFILE_CONCURRENCYINFO  (x64 32 / x86 28 バイト)
typedef struct KSCAMERA_PROFILE_CONCURRENCYINFO {
    GUID ReferenceGuid;
    DWORD Reserved;
    DWORD ProfileCount;
    KSCAMERA_PROFILE_INFO* Profiles;
} KSCAMERA_PROFILE_CONCURRENCYINFO;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSCAMERA_PROFILE_CONCURRENCYINFO
{
    public Guid ReferenceGuid;
    public uint Reserved;
    public uint ProfileCount;
    public IntPtr Profiles;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSCAMERA_PROFILE_CONCURRENCYINFO
    Public ReferenceGuid As Guid
    Public Reserved As UInteger
    Public ProfileCount As UInteger
    Public Profiles As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class KSCAMERA_PROFILE_CONCURRENCYINFO(ctypes.Structure):
    _fields_ = [
        ("ReferenceGuid", GUID),
        ("Reserved", wintypes.DWORD),
        ("ProfileCount", wintypes.DWORD),
        ("Profiles", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct KSCAMERA_PROFILE_CONCURRENCYINFO {
    pub ReferenceGuid: GUID,
    pub Reserved: u32,
    pub ProfileCount: u32,
    pub Profiles: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type KSCAMERA_PROFILE_CONCURRENCYINFO struct {
	ReferenceGuid windows.GUID
	Reserved uint32
	ProfileCount uint32
	Profiles uintptr
}
type
  KSCAMERA_PROFILE_CONCURRENCYINFO = record
    ReferenceGuid: TGUID;
    Reserved: DWORD;
    ProfileCount: DWORD;
    Profiles: Pointer;
  end;
const KSCAMERA_PROFILE_CONCURRENCYINFO = extern struct {
    ReferenceGuid: GUID,
    Reserved: u32,
    ProfileCount: u32,
    Profiles: ?*anyopaque,
};
type
  KSCAMERA_PROFILE_CONCURRENCYINFO {.bycopy.} = object
    ReferenceGuid: GUID
    Reserved: uint32
    ProfileCount: uint32
    Profiles: pointer
struct KSCAMERA_PROFILE_CONCURRENCYINFO
{
    GUID ReferenceGuid;
    uint Reserved;
    uint ProfileCount;
    void* Profiles;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; KSCAMERA_PROFILE_CONCURRENCYINFO サイズ: 28 バイト(x86)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; ReferenceGuid : GUID (+0, 16byte)  varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; Reserved : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ProfileCount : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; Profiles : KSCAMERA_PROFILE_INFO* (+24, 4byte)  varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KSCAMERA_PROFILE_CONCURRENCYINFO サイズ: 32 バイト(x64)
dim st, 8    ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; ReferenceGuid : GUID (+0, 16byte)  varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; Reserved : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ProfileCount : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; Profiles : KSCAMERA_PROFILE_INFO* (+24, 8byte)  varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; ※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_PROFILE_CONCURRENCYINFO
    #field GUID ReferenceGuid
    #field int Reserved
    #field int ProfileCount
    #field intptr Profiles
#endstruct

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