ホーム › Graphics.Direct3D11 › D3D11_ENCRYPTED_BLOCK_INFO
D3D11_ENCRYPTED_BLOCK_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NumEncryptedBytesAtBeginning | DWORD | 4 | +0 | +0 | バッファ先頭で暗号化されているバイト数。 |
| NumBytesInSkipPattern | DWORD | 4 | +4 | +4 | 暗号化パターンにおいてスキップ(平文)するバイト数。 |
| NumBytesInEncryptPattern | DWORD | 4 | +8 | +8 | 暗号化パターンにおいて暗号化するバイト数。 |
各言語での定義
#include <windows.h>
// D3D11_ENCRYPTED_BLOCK_INFO (x64 12 / x86 12 バイト)
typedef struct D3D11_ENCRYPTED_BLOCK_INFO {
DWORD NumEncryptedBytesAtBeginning;
DWORD NumBytesInSkipPattern;
DWORD NumBytesInEncryptPattern;
} D3D11_ENCRYPTED_BLOCK_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D11_ENCRYPTED_BLOCK_INFO
{
public uint NumEncryptedBytesAtBeginning;
public uint NumBytesInSkipPattern;
public uint NumBytesInEncryptPattern;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D11_ENCRYPTED_BLOCK_INFO
Public NumEncryptedBytesAtBeginning As UInteger
Public NumBytesInSkipPattern As UInteger
Public NumBytesInEncryptPattern As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D11_ENCRYPTED_BLOCK_INFO(ctypes.Structure):
_fields_ = [
("NumEncryptedBytesAtBeginning", wintypes.DWORD),
("NumBytesInSkipPattern", wintypes.DWORD),
("NumBytesInEncryptPattern", wintypes.DWORD),
]#[repr(C)]
pub struct D3D11_ENCRYPTED_BLOCK_INFO {
pub NumEncryptedBytesAtBeginning: u32,
pub NumBytesInSkipPattern: u32,
pub NumBytesInEncryptPattern: u32,
}import "golang.org/x/sys/windows"
type D3D11_ENCRYPTED_BLOCK_INFO struct {
NumEncryptedBytesAtBeginning uint32
NumBytesInSkipPattern uint32
NumBytesInEncryptPattern uint32
}type
D3D11_ENCRYPTED_BLOCK_INFO = record
NumEncryptedBytesAtBeginning: DWORD;
NumBytesInSkipPattern: DWORD;
NumBytesInEncryptPattern: DWORD;
end;const D3D11_ENCRYPTED_BLOCK_INFO = extern struct {
NumEncryptedBytesAtBeginning: u32,
NumBytesInSkipPattern: u32,
NumBytesInEncryptPattern: u32,
};type
D3D11_ENCRYPTED_BLOCK_INFO {.bycopy.} = object
NumEncryptedBytesAtBeginning: uint32
NumBytesInSkipPattern: uint32
NumBytesInEncryptPattern: uint32struct D3D11_ENCRYPTED_BLOCK_INFO
{
uint NumEncryptedBytesAtBeginning;
uint NumBytesInSkipPattern;
uint NumBytesInEncryptPattern;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D11_ENCRYPTED_BLOCK_INFO サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; NumEncryptedBytesAtBeginning : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; NumBytesInSkipPattern : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; NumBytesInEncryptPattern : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D11_ENCRYPTED_BLOCK_INFO
#field int NumEncryptedBytesAtBeginning
#field int NumBytesInSkipPattern
#field int NumBytesInEncryptPattern
#endstruct
stdim st, D3D11_ENCRYPTED_BLOCK_INFO ; NSTRUCT 変数を確保
st->NumEncryptedBytesAtBeginning = 100
mes "NumEncryptedBytesAtBeginning=" + st->NumEncryptedBytesAtBeginning