ホーム › System.Rpc › RPC_SECURITY_QOS
RPC_SECURITY_QOS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 | この構造体のバージョン。 |
| Capabilities | RPC_C_QOS_CAPABILITIES | 4 | +4 | +4 | セキュリティ機能を示すフラグ。RPC_C_QOS_CAPABILITIESで表す。 |
| IdentityTracking | RPC_C_QOS_IDENTITY | 4 | +8 | +8 | ID追跡方式。RPC_C_QOS_IDENTITYで表す。 |
| ImpersonationType | RPC_C_IMP_LEVEL | 4 | +12 | +12 | サーバーの偽装レベル。RPC_C_IMP_LEVELで表す。 |
各言語での定義
#include <windows.h>
// RPC_SECURITY_QOS (x64 16 / x86 16 バイト)
typedef struct RPC_SECURITY_QOS {
DWORD Version;
RPC_C_QOS_CAPABILITIES Capabilities;
RPC_C_QOS_IDENTITY IdentityTracking;
RPC_C_IMP_LEVEL ImpersonationType;
} RPC_SECURITY_QOS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RPC_SECURITY_QOS
{
public uint Version;
public uint Capabilities;
public uint IdentityTracking;
public uint ImpersonationType;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RPC_SECURITY_QOS
Public Version As UInteger
Public Capabilities As UInteger
Public IdentityTracking As UInteger
Public ImpersonationType As UInteger
End Structureimport ctypes
from ctypes import wintypes
class RPC_SECURITY_QOS(ctypes.Structure):
_fields_ = [
("Version", wintypes.DWORD),
("Capabilities", wintypes.DWORD),
("IdentityTracking", wintypes.DWORD),
("ImpersonationType", wintypes.DWORD),
]#[repr(C)]
pub struct RPC_SECURITY_QOS {
pub Version: u32,
pub Capabilities: u32,
pub IdentityTracking: u32,
pub ImpersonationType: u32,
}import "golang.org/x/sys/windows"
type RPC_SECURITY_QOS struct {
Version uint32
Capabilities uint32
IdentityTracking uint32
ImpersonationType uint32
}type
RPC_SECURITY_QOS = record
Version: DWORD;
Capabilities: DWORD;
IdentityTracking: DWORD;
ImpersonationType: DWORD;
end;const RPC_SECURITY_QOS = extern struct {
Version: u32,
Capabilities: u32,
IdentityTracking: u32,
ImpersonationType: u32,
};type
RPC_SECURITY_QOS {.bycopy.} = object
Version: uint32
Capabilities: uint32
IdentityTracking: uint32
ImpersonationType: uint32struct RPC_SECURITY_QOS
{
uint Version;
uint Capabilities;
uint IdentityTracking;
uint ImpersonationType;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RPC_SECURITY_QOS サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Capabilities : RPC_C_QOS_CAPABILITIES (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; IdentityTracking : RPC_C_QOS_IDENTITY (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ImpersonationType : RPC_C_IMP_LEVEL (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RPC_SECURITY_QOS
#field int Version
#field int Capabilities
#field int IdentityTracking
#field int ImpersonationType
#endstruct
stdim st, RPC_SECURITY_QOS ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version