ホーム › System.Rpc › RPC_CALL_ATTRIBUTES_V3_A
RPC_CALL_ATTRIBUTES_V3_A
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 | この構造体のバージョン。3を指定する。 |
| Flags | DWORD | 4 | +4 | +4 | 取得する属性を指定するフラグ。 |
| ServerPrincipalNameBufferLength | DWORD | 4 | +8 | +8 | サーバープリンシパル名バッファの長さをバイト単位で表す。 |
| ServerPrincipalName | BYTE* | 8/4 | +16 | +12 | サーバーのプリンシパル名。ANSI(BYTE)文字列へのポインター。 |
| ClientPrincipalNameBufferLength | DWORD | 4 | +24 | +16 | クライアントプリンシパル名バッファの長さをバイト単位で表す。 |
| ClientPrincipalName | BYTE* | 8/4 | +32 | +20 | クライアントのプリンシパル名。ANSI(BYTE)文字列へのポインター。 |
| AuthenticationLevel | DWORD | 4 | +40 | +24 | 呼び出しの認証レベルを示す値。 |
| AuthenticationService | DWORD | 4 | +44 | +28 | 使用された認証サービスの識別子。 |
| NullSession | BOOL | 4 | +48 | +32 | NULLセッションでの呼び出しかを示すフラグ。BOOL型。 |
| KernelModeCaller | BOOL | 4 | +52 | +36 | カーネルモードからの呼び出しかを示すフラグ。BOOL型。 |
| ProtocolSequence | DWORD | 4 | +56 | +40 | 使用されたプロトコルシーケンスの識別子。 |
| IsClientLocal | DWORD | 4 | +60 | +44 | クライアントがローカルかを示す値。 |
| ClientPID | HANDLE | 8/4 | +64 | +48 | クライアントプロセスのID(ハンドルとして格納)。 |
| CallStatus | DWORD | 4 | +72 | +52 | 呼び出しの現在のステータス。 |
| CallType | RpcCallType | 4 | +76 | +56 | 呼び出しの種別。RpcCallTypeで表す。 |
| CallLocalAddress | RPC_CALL_LOCAL_ADDRESS_V1* | 8/4 | +80 | +60 | 呼び出しを受けたローカルアドレスへのポインター。 |
| OpNum | WORD | 2 | +88 | +64 | 呼び出されたプロシージャのオペレーション番号。 |
| InterfaceUuid | GUID | 16 | +92 | +68 | 呼び出されたインターフェイスのUUID。 |
| ClientIdentifierBufferLength | DWORD | 4 | +108 | +84 | クライアント識別子バッファの長さをバイト単位で表す。 |
| ClientIdentifier | BYTE* | 8/4 | +112 | +88 | クライアントを識別するデータへのポインター。BYTE配列。 |
各言語での定義
#include <windows.h>
// RPC_CALL_ATTRIBUTES_V3_A (x64 120 / x86 92 バイト)
typedef struct RPC_CALL_ATTRIBUTES_V3_A {
DWORD Version;
DWORD Flags;
DWORD ServerPrincipalNameBufferLength;
BYTE* ServerPrincipalName;
DWORD ClientPrincipalNameBufferLength;
BYTE* ClientPrincipalName;
DWORD AuthenticationLevel;
DWORD AuthenticationService;
BOOL NullSession;
BOOL KernelModeCaller;
DWORD ProtocolSequence;
DWORD IsClientLocal;
HANDLE ClientPID;
DWORD CallStatus;
RpcCallType CallType;
RPC_CALL_LOCAL_ADDRESS_V1* CallLocalAddress;
WORD OpNum;
GUID InterfaceUuid;
DWORD ClientIdentifierBufferLength;
BYTE* ClientIdentifier;
} RPC_CALL_ATTRIBUTES_V3_A;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RPC_CALL_ATTRIBUTES_V3_A
{
public uint Version;
public uint Flags;
public uint ServerPrincipalNameBufferLength;
public IntPtr ServerPrincipalName;
public uint ClientPrincipalNameBufferLength;
public IntPtr ClientPrincipalName;
public uint AuthenticationLevel;
public uint AuthenticationService;
[MarshalAs(UnmanagedType.Bool)] public bool NullSession;
[MarshalAs(UnmanagedType.Bool)] public bool KernelModeCaller;
public uint ProtocolSequence;
public uint IsClientLocal;
public IntPtr ClientPID;
public uint CallStatus;
public int CallType;
public IntPtr CallLocalAddress;
public ushort OpNum;
public Guid InterfaceUuid;
public uint ClientIdentifierBufferLength;
public IntPtr ClientIdentifier;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RPC_CALL_ATTRIBUTES_V3_A
Public Version As UInteger
Public Flags As UInteger
Public ServerPrincipalNameBufferLength As UInteger
Public ServerPrincipalName As IntPtr
Public ClientPrincipalNameBufferLength As UInteger
Public ClientPrincipalName As IntPtr
Public AuthenticationLevel As UInteger
Public AuthenticationService As UInteger
<MarshalAs(UnmanagedType.Bool)> Public NullSession As Boolean
<MarshalAs(UnmanagedType.Bool)> Public KernelModeCaller As Boolean
Public ProtocolSequence As UInteger
Public IsClientLocal As UInteger
Public ClientPID As IntPtr
Public CallStatus As UInteger
Public CallType As Integer
Public CallLocalAddress As IntPtr
Public OpNum As UShort
Public InterfaceUuid As Guid
Public ClientIdentifierBufferLength As UInteger
Public ClientIdentifier As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class RPC_CALL_ATTRIBUTES_V3_A(ctypes.Structure):
_fields_ = [
("Version", wintypes.DWORD),
("Flags", wintypes.DWORD),
("ServerPrincipalNameBufferLength", wintypes.DWORD),
("ServerPrincipalName", ctypes.c_void_p),
("ClientPrincipalNameBufferLength", wintypes.DWORD),
("ClientPrincipalName", ctypes.c_void_p),
("AuthenticationLevel", wintypes.DWORD),
("AuthenticationService", wintypes.DWORD),
("NullSession", wintypes.BOOL),
("KernelModeCaller", wintypes.BOOL),
("ProtocolSequence", wintypes.DWORD),
("IsClientLocal", wintypes.DWORD),
("ClientPID", ctypes.c_void_p),
("CallStatus", wintypes.DWORD),
("CallType", ctypes.c_int),
("CallLocalAddress", ctypes.c_void_p),
("OpNum", ctypes.c_ushort),
("InterfaceUuid", GUID),
("ClientIdentifierBufferLength", wintypes.DWORD),
("ClientIdentifier", ctypes.c_void_p),
]#[repr(C)]
pub struct RPC_CALL_ATTRIBUTES_V3_A {
pub Version: u32,
pub Flags: u32,
pub ServerPrincipalNameBufferLength: u32,
pub ServerPrincipalName: *mut core::ffi::c_void,
pub ClientPrincipalNameBufferLength: u32,
pub ClientPrincipalName: *mut core::ffi::c_void,
pub AuthenticationLevel: u32,
pub AuthenticationService: u32,
pub NullSession: i32,
pub KernelModeCaller: i32,
pub ProtocolSequence: u32,
pub IsClientLocal: u32,
pub ClientPID: *mut core::ffi::c_void,
pub CallStatus: u32,
pub CallType: i32,
pub CallLocalAddress: *mut core::ffi::c_void,
pub OpNum: u16,
pub InterfaceUuid: GUID,
pub ClientIdentifierBufferLength: u32,
pub ClientIdentifier: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type RPC_CALL_ATTRIBUTES_V3_A struct {
Version uint32
Flags uint32
ServerPrincipalNameBufferLength uint32
ServerPrincipalName uintptr
ClientPrincipalNameBufferLength uint32
ClientPrincipalName uintptr
AuthenticationLevel uint32
AuthenticationService uint32
NullSession int32
KernelModeCaller int32
ProtocolSequence uint32
IsClientLocal uint32
ClientPID uintptr
CallStatus uint32
CallType int32
CallLocalAddress uintptr
OpNum uint16
InterfaceUuid windows.GUID
ClientIdentifierBufferLength uint32
ClientIdentifier uintptr
}type
RPC_CALL_ATTRIBUTES_V3_A = record
Version: DWORD;
Flags: DWORD;
ServerPrincipalNameBufferLength: DWORD;
ServerPrincipalName: Pointer;
ClientPrincipalNameBufferLength: DWORD;
ClientPrincipalName: Pointer;
AuthenticationLevel: DWORD;
AuthenticationService: DWORD;
NullSession: BOOL;
KernelModeCaller: BOOL;
ProtocolSequence: DWORD;
IsClientLocal: DWORD;
ClientPID: Pointer;
CallStatus: DWORD;
CallType: Integer;
CallLocalAddress: Pointer;
OpNum: Word;
InterfaceUuid: TGUID;
ClientIdentifierBufferLength: DWORD;
ClientIdentifier: Pointer;
end;const RPC_CALL_ATTRIBUTES_V3_A = extern struct {
Version: u32,
Flags: u32,
ServerPrincipalNameBufferLength: u32,
ServerPrincipalName: ?*anyopaque,
ClientPrincipalNameBufferLength: u32,
ClientPrincipalName: ?*anyopaque,
AuthenticationLevel: u32,
AuthenticationService: u32,
NullSession: i32,
KernelModeCaller: i32,
ProtocolSequence: u32,
IsClientLocal: u32,
ClientPID: ?*anyopaque,
CallStatus: u32,
CallType: i32,
CallLocalAddress: ?*anyopaque,
OpNum: u16,
InterfaceUuid: GUID,
ClientIdentifierBufferLength: u32,
ClientIdentifier: ?*anyopaque,
};type
RPC_CALL_ATTRIBUTES_V3_A {.bycopy.} = object
Version: uint32
Flags: uint32
ServerPrincipalNameBufferLength: uint32
ServerPrincipalName: pointer
ClientPrincipalNameBufferLength: uint32
ClientPrincipalName: pointer
AuthenticationLevel: uint32
AuthenticationService: uint32
NullSession: int32
KernelModeCaller: int32
ProtocolSequence: uint32
IsClientLocal: uint32
ClientPID: pointer
CallStatus: uint32
CallType: int32
CallLocalAddress: pointer
OpNum: uint16
InterfaceUuid: GUID
ClientIdentifierBufferLength: uint32
ClientIdentifier: pointerstruct RPC_CALL_ATTRIBUTES_V3_A
{
uint Version;
uint Flags;
uint ServerPrincipalNameBufferLength;
void* ServerPrincipalName;
uint ClientPrincipalNameBufferLength;
void* ClientPrincipalName;
uint AuthenticationLevel;
uint AuthenticationService;
int NullSession;
int KernelModeCaller;
uint ProtocolSequence;
uint IsClientLocal;
void* ClientPID;
uint CallStatus;
int CallType;
void* CallLocalAddress;
ushort OpNum;
GUID InterfaceUuid;
uint ClientIdentifierBufferLength;
void* ClientIdentifier;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; RPC_CALL_ATTRIBUTES_V3_A サイズ: 92 バイト(x86)
dim st, 23 ; 4byte整数×23(構造体サイズ 92 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Flags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ServerPrincipalNameBufferLength : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ServerPrincipalName : BYTE* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ClientPrincipalNameBufferLength : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ClientPrincipalName : BYTE* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; AuthenticationLevel : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; AuthenticationService : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; NullSession : BOOL (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; KernelModeCaller : BOOL (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; ProtocolSequence : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; IsClientLocal : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ClientPID : HANDLE (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; CallStatus : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; CallType : RpcCallType (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; CallLocalAddress : RPC_CALL_LOCAL_ADDRESS_V1* (+60, 4byte) varptr(st)+60 を基点に操作(4byte:入れ子/配列)
; OpNum : WORD (+64, 2byte) wpoke st,64,値 / 値 = wpeek(st,64)
; InterfaceUuid : GUID (+68, 16byte) varptr(st)+68 を基点に操作(16byte:入れ子/配列)
; ClientIdentifierBufferLength : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ClientIdentifier : BYTE* (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RPC_CALL_ATTRIBUTES_V3_A サイズ: 120 バイト(x64)
dim st, 30 ; 4byte整数×30(構造体サイズ 120 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Flags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ServerPrincipalNameBufferLength : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ServerPrincipalName : BYTE* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ClientPrincipalNameBufferLength : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ClientPrincipalName : BYTE* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; AuthenticationLevel : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; AuthenticationService : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; NullSession : BOOL (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; KernelModeCaller : BOOL (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ProtocolSequence : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; IsClientLocal : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; ClientPID : HANDLE (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; CallStatus : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; CallType : RpcCallType (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; CallLocalAddress : RPC_CALL_LOCAL_ADDRESS_V1* (+80, 8byte) varptr(st)+80 を基点に操作(8byte:入れ子/配列)
; OpNum : WORD (+88, 2byte) wpoke st,88,値 / 値 = wpeek(st,88)
; InterfaceUuid : GUID (+92, 16byte) varptr(st)+92 を基点に操作(16byte:入れ子/配列)
; ClientIdentifierBufferLength : DWORD (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; ClientIdentifier : BYTE* (+112, 8byte) qpoke st,112,値 / qpeek(st,112) ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global RPC_CALL_ATTRIBUTES_V3_A
#field int Version
#field int Flags
#field int ServerPrincipalNameBufferLength
#field intptr ServerPrincipalName
#field int ClientPrincipalNameBufferLength
#field intptr ClientPrincipalName
#field int AuthenticationLevel
#field int AuthenticationService
#field bool NullSession
#field bool KernelModeCaller
#field int ProtocolSequence
#field int IsClientLocal
#field intptr ClientPID
#field int CallStatus
#field int CallType
#field intptr CallLocalAddress
#field short OpNum
#field GUID InterfaceUuid
#field int ClientIdentifierBufferLength
#field intptr ClientIdentifier
#endstruct
stdim st, RPC_CALL_ATTRIBUTES_V3_A ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version