ホーム › Security.Authentication.Identity › SE_ADT_PARAMETER_ARRAY_ENTRY
SE_ADT_PARAMETER_ARRAY_ENTRY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Type | SE_ADT_PARAMETER_TYPE | 4 | +0 | +0 | 監査パラメータのデータ型を示す列挙値。 |
| Length | DWORD | 4 | +4 | +4 | パラメータデータのバイト長。 |
| Data | UINT_PTR | 16/8 | +8 | +8 | パラメータ値(整数値またはポインタ相当の埋め込みデータ)。 |
| Address | void* | 8/4 | +24 | +16 | 可変長データへのポインタ。Typeに応じて使用する。 |
各言語での定義
#include <windows.h>
// SE_ADT_PARAMETER_ARRAY_ENTRY (x64 32 / x86 20 バイト)
typedef struct SE_ADT_PARAMETER_ARRAY_ENTRY {
SE_ADT_PARAMETER_TYPE Type;
DWORD Length;
UINT_PTR Data[2];
void* Address;
} SE_ADT_PARAMETER_ARRAY_ENTRY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SE_ADT_PARAMETER_ARRAY_ENTRY
{
public int Type;
public uint Length;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public UIntPtr[] Data;
public IntPtr Address;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SE_ADT_PARAMETER_ARRAY_ENTRY
Public Type As Integer
Public Length As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=2)> Public Data() As UIntPtr
Public Address As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class SE_ADT_PARAMETER_ARRAY_ENTRY(ctypes.Structure):
_fields_ = [
("Type", ctypes.c_int),
("Length", wintypes.DWORD),
("Data", ctypes.c_size_t * 2),
("Address", ctypes.c_void_p),
]#[repr(C)]
pub struct SE_ADT_PARAMETER_ARRAY_ENTRY {
pub Type: i32,
pub Length: u32,
pub Data: [usize; 2],
pub Address: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type SE_ADT_PARAMETER_ARRAY_ENTRY struct {
Type int32
Length uint32
Data [2]uintptr
Address uintptr
}type
SE_ADT_PARAMETER_ARRAY_ENTRY = record
Type: Integer;
Length: DWORD;
Data: array[0..1] of NativeUInt;
Address: Pointer;
end;const SE_ADT_PARAMETER_ARRAY_ENTRY = extern struct {
Type: i32,
Length: u32,
Data: [2]usize,
Address: ?*anyopaque,
};type
SE_ADT_PARAMETER_ARRAY_ENTRY {.bycopy.} = object
Type: int32
Length: uint32
Data: array[2, uint]
Address: pointerstruct SE_ADT_PARAMETER_ARRAY_ENTRY
{
int Type;
uint Length;
size_t[2] Data;
void* Address;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SE_ADT_PARAMETER_ARRAY_ENTRY サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; Type : SE_ADT_PARAMETER_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Length : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Data : UINT_PTR (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; Address : void* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SE_ADT_PARAMETER_ARRAY_ENTRY サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Type : SE_ADT_PARAMETER_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Length : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Data : UINT_PTR (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; Address : void* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SE_ADT_PARAMETER_ARRAY_ENTRY
#field int Type
#field int Length
#field intptr Data 2
#field intptr Address
#endstruct
stdim st, SE_ADT_PARAMETER_ARRAY_ENTRY ; NSTRUCT 変数を確保
st->Type = 100
mes "Type=" + st->Type