ホーム › Security.Authorization › AUTHZ_ACCESS_REPLY
AUTHZ_ACCESS_REPLY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ResultListLength | DWORD | 4 | +0 | +0 | 各結果配列の要素数。 |
| GrantedAccessMask | DWORD* | 8/4 | +8 | +4 | 付与されたアクセス権のビットマスク配列へのポインタ。 |
| SaclEvaluationResults | AUTHZ_GENERATE_RESULTS* | 8/4 | +16 | +8 | SACL評価結果の配列へのポインタ。NULL可。 |
| Error | DWORD* | 8/4 | +24 | +12 | 各オブジェクトに対するアクセスチェック結果コード配列へのポインタ。 |
各言語での定義
#include <windows.h>
// AUTHZ_ACCESS_REPLY (x64 32 / x86 16 バイト)
typedef struct AUTHZ_ACCESS_REPLY {
DWORD ResultListLength;
DWORD* GrantedAccessMask;
AUTHZ_GENERATE_RESULTS* SaclEvaluationResults;
DWORD* Error;
} AUTHZ_ACCESS_REPLY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct AUTHZ_ACCESS_REPLY
{
public uint ResultListLength;
public IntPtr GrantedAccessMask;
public IntPtr SaclEvaluationResults;
public IntPtr Error;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure AUTHZ_ACCESS_REPLY
Public ResultListLength As UInteger
Public GrantedAccessMask As IntPtr
Public SaclEvaluationResults As IntPtr
Public Error As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class AUTHZ_ACCESS_REPLY(ctypes.Structure):
_fields_ = [
("ResultListLength", wintypes.DWORD),
("GrantedAccessMask", ctypes.c_void_p),
("SaclEvaluationResults", ctypes.c_void_p),
("Error", ctypes.c_void_p),
]#[repr(C)]
pub struct AUTHZ_ACCESS_REPLY {
pub ResultListLength: u32,
pub GrantedAccessMask: *mut core::ffi::c_void,
pub SaclEvaluationResults: *mut core::ffi::c_void,
pub Error: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type AUTHZ_ACCESS_REPLY struct {
ResultListLength uint32
GrantedAccessMask uintptr
SaclEvaluationResults uintptr
Error uintptr
}type
AUTHZ_ACCESS_REPLY = record
ResultListLength: DWORD;
GrantedAccessMask: Pointer;
SaclEvaluationResults: Pointer;
Error: Pointer;
end;const AUTHZ_ACCESS_REPLY = extern struct {
ResultListLength: u32,
GrantedAccessMask: ?*anyopaque,
SaclEvaluationResults: ?*anyopaque,
Error: ?*anyopaque,
};type
AUTHZ_ACCESS_REPLY {.bycopy.} = object
ResultListLength: uint32
GrantedAccessMask: pointer
SaclEvaluationResults: pointer
Error: pointerstruct AUTHZ_ACCESS_REPLY
{
uint ResultListLength;
void* GrantedAccessMask;
void* SaclEvaluationResults;
void* Error;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; AUTHZ_ACCESS_REPLY サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; ResultListLength : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; GrantedAccessMask : DWORD* (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; SaclEvaluationResults : AUTHZ_GENERATE_RESULTS* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Error : DWORD* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; AUTHZ_ACCESS_REPLY サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; ResultListLength : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; GrantedAccessMask : DWORD* (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; SaclEvaluationResults : AUTHZ_GENERATE_RESULTS* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; Error : DWORD* (+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 AUTHZ_ACCESS_REPLY
#field int ResultListLength
#field intptr GrantedAccessMask
#field intptr SaclEvaluationResults
#field intptr Error
#endstruct
stdim st, AUTHZ_ACCESS_REPLY ; NSTRUCT 変数を確保
st->ResultListLength = 100
mes "ResultListLength=" + st->ResultListLength