ホーム › Media.KernelStreaming › KSPROPERTY_TUNER_SCAN_CAPS_S
KSPROPERTY_TUNER_SCAN_CAPS_S
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Property | KSIDENTIFIER | 8 | +0 | +0 | 対象プロパティを識別するKSIDENTIFIER。プロパティセットGUID・ID・フラグを保持する。 |
| fSupportsHardwareAssistedScanning | BOOL | 4 | +8 | +8 | ハードウェア支援スキャンの対応可否を示すBOOL値。 |
| SupportedBroadcastStandards | DWORD | 4 | +12 | +12 | サポートする放送規格を示すフラグの組み合わせ。 |
| GUIDBucket | void* | 8/4 | +16 | +16 | ネットワーク種別GUIDの配列を指すバッファへのポインタ。 |
| lengthofBucket | DWORD | 4 | +24 | +20 | GUIDBucketバッファの長さをバイト単位で示す。 |
各言語での定義
#include <windows.h>
// KSIDENTIFIER (x64 8 / x86 8 バイト)
typedef struct KSIDENTIFIER {
_Anonymous_e__Union Anonymous;
} KSIDENTIFIER;
// KSPROPERTY_TUNER_SCAN_CAPS_S (x64 32 / x86 24 バイト)
typedef struct KSPROPERTY_TUNER_SCAN_CAPS_S {
KSIDENTIFIER Property;
BOOL fSupportsHardwareAssistedScanning;
DWORD SupportedBroadcastStandards;
void* GUIDBucket;
DWORD lengthofBucket;
} KSPROPERTY_TUNER_SCAN_CAPS_S;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSIDENTIFIER
{
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSPROPERTY_TUNER_SCAN_CAPS_S
{
public KSIDENTIFIER Property;
[MarshalAs(UnmanagedType.Bool)] public bool fSupportsHardwareAssistedScanning;
public uint SupportedBroadcastStandards;
public IntPtr GUIDBucket;
public uint lengthofBucket;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSIDENTIFIER
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSPROPERTY_TUNER_SCAN_CAPS_S
Public Property As KSIDENTIFIER
<MarshalAs(UnmanagedType.Bool)> Public fSupportsHardwareAssistedScanning As Boolean
Public SupportedBroadcastStandards As UInteger
Public GUIDBucket As IntPtr
Public lengthofBucket As UInteger
End Structureimport ctypes
from ctypes import wintypes
class KSIDENTIFIER(ctypes.Structure):
_fields_ = [
("Anonymous", _Anonymous_e__Union),
]
class KSPROPERTY_TUNER_SCAN_CAPS_S(ctypes.Structure):
_fields_ = [
("Property", KSIDENTIFIER),
("fSupportsHardwareAssistedScanning", wintypes.BOOL),
("SupportedBroadcastStandards", wintypes.DWORD),
("GUIDBucket", ctypes.c_void_p),
("lengthofBucket", wintypes.DWORD),
]#[repr(C)]
pub struct KSIDENTIFIER {
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct KSPROPERTY_TUNER_SCAN_CAPS_S {
pub Property: KSIDENTIFIER,
pub fSupportsHardwareAssistedScanning: i32,
pub SupportedBroadcastStandards: u32,
pub GUIDBucket: *mut core::ffi::c_void,
pub lengthofBucket: u32,
}import "golang.org/x/sys/windows"
type KSIDENTIFIER struct {
Anonymous _Anonymous_e__Union
}
type KSPROPERTY_TUNER_SCAN_CAPS_S struct {
Property KSIDENTIFIER
fSupportsHardwareAssistedScanning int32
SupportedBroadcastStandards uint32
GUIDBucket uintptr
lengthofBucket uint32
}type
KSIDENTIFIER = record
Anonymous: _Anonymous_e__Union;
end;
KSPROPERTY_TUNER_SCAN_CAPS_S = record
Property: KSIDENTIFIER;
fSupportsHardwareAssistedScanning: BOOL;
SupportedBroadcastStandards: DWORD;
GUIDBucket: Pointer;
lengthofBucket: DWORD;
end;const KSIDENTIFIER = extern struct {
Anonymous: _Anonymous_e__Union,
};
const KSPROPERTY_TUNER_SCAN_CAPS_S = extern struct {
Property: KSIDENTIFIER,
fSupportsHardwareAssistedScanning: i32,
SupportedBroadcastStandards: u32,
GUIDBucket: ?*anyopaque,
lengthofBucket: u32,
};type
KSIDENTIFIER {.bycopy.} = object
Anonymous: _Anonymous_e__Union
KSPROPERTY_TUNER_SCAN_CAPS_S {.bycopy.} = object
Property: KSIDENTIFIER
fSupportsHardwareAssistedScanning: int32
SupportedBroadcastStandards: uint32
GUIDBucket: pointer
lengthofBucket: uint32struct KSIDENTIFIER
{
_Anonymous_e__Union Anonymous;
}
struct KSPROPERTY_TUNER_SCAN_CAPS_S
{
KSIDENTIFIER Property;
int fSupportsHardwareAssistedScanning;
uint SupportedBroadcastStandards;
void* GUIDBucket;
uint lengthofBucket;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; KSPROPERTY_TUNER_SCAN_CAPS_S サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; Property : KSIDENTIFIER (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; fSupportsHardwareAssistedScanning : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; SupportedBroadcastStandards : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; GUIDBucket : void* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; lengthofBucket : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KSPROPERTY_TUNER_SCAN_CAPS_S サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Property : KSIDENTIFIER (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; fSupportsHardwareAssistedScanning : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; SupportedBroadcastStandards : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; GUIDBucket : void* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; lengthofBucket : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global KSIDENTIFIER
#field byte Anonymous 8
#endstruct
#defstruct global KSPROPERTY_TUNER_SCAN_CAPS_S
#field KSIDENTIFIER Property
#field bool fSupportsHardwareAssistedScanning
#field int SupportedBroadcastStandards
#field intptr GUIDBucket
#field int lengthofBucket
#endstruct
stdim st, KSPROPERTY_TUNER_SCAN_CAPS_S ; NSTRUCT 変数を確保
st->fSupportsHardwareAssistedScanning = 100
mes "fSupportsHardwareAssistedScanning=" + st->fSupportsHardwareAssistedScanning