DXVA_COPPSetProtectionLevelCmdData
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ProtType | DWORD | 4 | +0 | +0 | 保護メカニズムを識別します。COPP Protection Type Flags を参照してください。 | ||||||||
| ProtLevel | DWORD | 4 | +4 | +4 | 保護レベルを指定します。この値の意味は、照会される保護メカニズムによって異なります。各保護メカニズムについて、
| ||||||||
| ExtendedInfoChangeMask | DWORD | 4 | +8 | +8 | 予約済みです。0 でなければなりません。 | ||||||||
| ExtendedInfoData | DWORD | 4 | +12 | +12 | 予約済みです。0 でなければなりません。 |
公式ドキュメント
[このページに関連する機能である DirectShow は、レガシー機能です。この機能は MediaPlayer、IMFMediaEngine、および Audio/Video Capture in Media Foundation に置き換えられました。これらの機能は Windows 10 および Windows 11 向けに最適化されています。Microsoft は、可能な場合は新しいコードで DirectShow ではなく MediaPlayer、IMFMediaEngine、Audio/Video Capture in Media Foundation を使用することを強く推奨します。レガシー API を使用している既存のコードについても、可能であれば新しい API を使用するように書き換えることを推奨します。]
Certified Output Protection Protocol (COPP) の Set Protection Level コマンドのデータを格納します。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// DXVA_COPPSetProtectionLevelCmdData (x64 16 / x86 16 バイト)
typedef struct DXVA_COPPSetProtectionLevelCmdData {
DWORD ProtType;
DWORD ProtLevel;
DWORD ExtendedInfoChangeMask;
DWORD ExtendedInfoData;
} DXVA_COPPSetProtectionLevelCmdData;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA_COPPSetProtectionLevelCmdData
{
public uint ProtType;
public uint ProtLevel;
public uint ExtendedInfoChangeMask;
public uint ExtendedInfoData;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA_COPPSetProtectionLevelCmdData
Public ProtType As UInteger
Public ProtLevel As UInteger
Public ExtendedInfoChangeMask As UInteger
Public ExtendedInfoData As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DXVA_COPPSetProtectionLevelCmdData(ctypes.Structure):
_fields_ = [
("ProtType", wintypes.DWORD),
("ProtLevel", wintypes.DWORD),
("ExtendedInfoChangeMask", wintypes.DWORD),
("ExtendedInfoData", wintypes.DWORD),
]#[repr(C)]
pub struct DXVA_COPPSetProtectionLevelCmdData {
pub ProtType: u32,
pub ProtLevel: u32,
pub ExtendedInfoChangeMask: u32,
pub ExtendedInfoData: u32,
}import "golang.org/x/sys/windows"
type DXVA_COPPSetProtectionLevelCmdData struct {
ProtType uint32
ProtLevel uint32
ExtendedInfoChangeMask uint32
ExtendedInfoData uint32
}type
DXVA_COPPSetProtectionLevelCmdData = record
ProtType: DWORD;
ProtLevel: DWORD;
ExtendedInfoChangeMask: DWORD;
ExtendedInfoData: DWORD;
end;const DXVA_COPPSetProtectionLevelCmdData = extern struct {
ProtType: u32,
ProtLevel: u32,
ExtendedInfoChangeMask: u32,
ExtendedInfoData: u32,
};type
DXVA_COPPSetProtectionLevelCmdData {.bycopy.} = object
ProtType: uint32
ProtLevel: uint32
ExtendedInfoChangeMask: uint32
ExtendedInfoData: uint32struct DXVA_COPPSetProtectionLevelCmdData
{
uint ProtType;
uint ProtLevel;
uint ExtendedInfoChangeMask;
uint ExtendedInfoData;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVA_COPPSetProtectionLevelCmdData サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; ProtType : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ProtLevel : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ExtendedInfoChangeMask : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ExtendedInfoData : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DXVA_COPPSetProtectionLevelCmdData
#field int ProtType
#field int ProtLevel
#field int ExtendedInfoChangeMask
#field int ExtendedInfoData
#endstruct
stdim st, DXVA_COPPSetProtectionLevelCmdData ; NSTRUCT 変数を確保
st->ProtType = 100
mes "ProtType=" + st->ProtType