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