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