ホーム › NetworkManagement.NetManagement › AUDIT_ENTRY
AUDIT_ENTRY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ae_len | DWORD | 4 | +0 | +0 | この監査エントリ全体の長さをバイト単位で示す。 |
| ae_reserved | DWORD | 4 | +4 | +4 | 予約領域。将来の使用のため確保される。 |
| ae_time | DWORD | 4 | +8 | +8 | 監査イベントが記録された時刻をUTC基準の秒数で示す。 |
| ae_type | DWORD | 4 | +12 | +12 | 監査イベントの種別を示すコード(AE_*定数)。 |
| ae_data_offset | DWORD | 4 | +16 | +16 | イベント固有データのエントリ先頭からのオフセットをバイト単位で示す。 |
| ae_data_size | DWORD | 4 | +20 | +20 | イベント固有データの長さをバイト単位で示す。 |
各言語での定義
#include <windows.h>
// AUDIT_ENTRY (x64 24 / x86 24 バイト)
typedef struct AUDIT_ENTRY {
DWORD ae_len;
DWORD ae_reserved;
DWORD ae_time;
DWORD ae_type;
DWORD ae_data_offset;
DWORD ae_data_size;
} AUDIT_ENTRY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct AUDIT_ENTRY
{
public uint ae_len;
public uint ae_reserved;
public uint ae_time;
public uint ae_type;
public uint ae_data_offset;
public uint ae_data_size;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure AUDIT_ENTRY
Public ae_len As UInteger
Public ae_reserved As UInteger
Public ae_time As UInteger
Public ae_type As UInteger
Public ae_data_offset As UInteger
Public ae_data_size As UInteger
End Structureimport ctypes
from ctypes import wintypes
class AUDIT_ENTRY(ctypes.Structure):
_fields_ = [
("ae_len", wintypes.DWORD),
("ae_reserved", wintypes.DWORD),
("ae_time", wintypes.DWORD),
("ae_type", wintypes.DWORD),
("ae_data_offset", wintypes.DWORD),
("ae_data_size", wintypes.DWORD),
]#[repr(C)]
pub struct AUDIT_ENTRY {
pub ae_len: u32,
pub ae_reserved: u32,
pub ae_time: u32,
pub ae_type: u32,
pub ae_data_offset: u32,
pub ae_data_size: u32,
}import "golang.org/x/sys/windows"
type AUDIT_ENTRY struct {
ae_len uint32
ae_reserved uint32
ae_time uint32
ae_type uint32
ae_data_offset uint32
ae_data_size uint32
}type
AUDIT_ENTRY = record
ae_len: DWORD;
ae_reserved: DWORD;
ae_time: DWORD;
ae_type: DWORD;
ae_data_offset: DWORD;
ae_data_size: DWORD;
end;const AUDIT_ENTRY = extern struct {
ae_len: u32,
ae_reserved: u32,
ae_time: u32,
ae_type: u32,
ae_data_offset: u32,
ae_data_size: u32,
};type
AUDIT_ENTRY {.bycopy.} = object
ae_len: uint32
ae_reserved: uint32
ae_time: uint32
ae_type: uint32
ae_data_offset: uint32
ae_data_size: uint32struct AUDIT_ENTRY
{
uint ae_len;
uint ae_reserved;
uint ae_time;
uint ae_type;
uint ae_data_offset;
uint ae_data_size;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; AUDIT_ENTRY サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; ae_len : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ae_reserved : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ae_time : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ae_type : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ae_data_offset : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ae_data_size : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global AUDIT_ENTRY
#field int ae_len
#field int ae_reserved
#field int ae_time
#field int ae_type
#field int ae_data_offset
#field int ae_data_size
#endstruct
stdim st, AUDIT_ENTRY ; NSTRUCT 変数を確保
st->ae_len = 100
mes "ae_len=" + st->ae_len