ホーム › Security.Authentication.Identity › MSV1_0_CREDENTIAL_KEY
MSV1_0_CREDENTIAL_KEY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Data | BYTE | 20 | +0 | +0 | 資格情報キーの生バイトデータ(固定長配列)。 |
各言語での定義
#include <windows.h>
// MSV1_0_CREDENTIAL_KEY (x64 20 / x86 20 バイト)
typedef struct MSV1_0_CREDENTIAL_KEY {
BYTE Data[20];
} MSV1_0_CREDENTIAL_KEY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MSV1_0_CREDENTIAL_KEY
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] public byte[] Data;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MSV1_0_CREDENTIAL_KEY
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=20)> Public Data() As Byte
End Structureimport ctypes
from ctypes import wintypes
class MSV1_0_CREDENTIAL_KEY(ctypes.Structure):
_fields_ = [
("Data", ctypes.c_ubyte * 20),
]#[repr(C)]
pub struct MSV1_0_CREDENTIAL_KEY {
pub Data: [u8; 20],
}import "golang.org/x/sys/windows"
type MSV1_0_CREDENTIAL_KEY struct {
Data [20]byte
}type
MSV1_0_CREDENTIAL_KEY = record
Data: array[0..19] of Byte;
end;const MSV1_0_CREDENTIAL_KEY = extern struct {
Data: [20]u8,
};type
MSV1_0_CREDENTIAL_KEY {.bycopy.} = object
Data: array[20, uint8]struct MSV1_0_CREDENTIAL_KEY
{
ubyte[20] Data;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MSV1_0_CREDENTIAL_KEY サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; Data : BYTE (+0, 20byte) varptr(st)+0 を基点に操作(20byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MSV1_0_CREDENTIAL_KEY
#field byte Data 20
#endstruct
stdim st, MSV1_0_CREDENTIAL_KEY ; NSTRUCT 変数を確保