Win32 API 日本語リファレンス
ホームSecurity.Authorization › AUTHZ_RPC_INIT_INFO_CLIENT

AUTHZ_RPC_INIT_INFO_CLIENT

構造体
サイズx64: 56 バイト / x86: 28 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
versionWORD2+0+0この初期化情報構造体のバージョン。
ObjectUuidLPWSTR8/4+8+4RPCバインディングのオブジェクトUUID文字列。NULL可。
ProtSeqLPWSTR8/4+16+8RPCのプロトコルシーケンス文字列。
NetworkAddrLPWSTR8/4+24+12接続先サーバーのネットワークアドレス文字列。
EndpointLPWSTR8/4+32+16RPCエンドポイント文字列。
OptionsLPWSTR8/4+40+20バインディングのオプション文字列。NULL可。
ServerSpnLPWSTR8/4+48+24相互認証に用いるサーバーのSPN文字列。NULL可。

各言語での定義

#include <windows.h>

// AUTHZ_RPC_INIT_INFO_CLIENT  (x64 56 / x86 28 バイト)
typedef struct AUTHZ_RPC_INIT_INFO_CLIENT {
    WORD version;
    LPWSTR ObjectUuid;
    LPWSTR ProtSeq;
    LPWSTR NetworkAddr;
    LPWSTR Endpoint;
    LPWSTR Options;
    LPWSTR ServerSpn;
} AUTHZ_RPC_INIT_INFO_CLIENT;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct AUTHZ_RPC_INIT_INFO_CLIENT
{
    public ushort version;
    public IntPtr ObjectUuid;
    public IntPtr ProtSeq;
    public IntPtr NetworkAddr;
    public IntPtr Endpoint;
    public IntPtr Options;
    public IntPtr ServerSpn;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure AUTHZ_RPC_INIT_INFO_CLIENT
    Public version As UShort
    Public ObjectUuid As IntPtr
    Public ProtSeq As IntPtr
    Public NetworkAddr As IntPtr
    Public Endpoint As IntPtr
    Public Options As IntPtr
    Public ServerSpn As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class AUTHZ_RPC_INIT_INFO_CLIENT(ctypes.Structure):
    _fields_ = [
        ("version", ctypes.c_ushort),
        ("ObjectUuid", ctypes.c_void_p),
        ("ProtSeq", ctypes.c_void_p),
        ("NetworkAddr", ctypes.c_void_p),
        ("Endpoint", ctypes.c_void_p),
        ("Options", ctypes.c_void_p),
        ("ServerSpn", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct AUTHZ_RPC_INIT_INFO_CLIENT {
    pub version: u16,
    pub ObjectUuid: *mut core::ffi::c_void,
    pub ProtSeq: *mut core::ffi::c_void,
    pub NetworkAddr: *mut core::ffi::c_void,
    pub Endpoint: *mut core::ffi::c_void,
    pub Options: *mut core::ffi::c_void,
    pub ServerSpn: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type AUTHZ_RPC_INIT_INFO_CLIENT struct {
	version uint16
	ObjectUuid uintptr
	ProtSeq uintptr
	NetworkAddr uintptr
	Endpoint uintptr
	Options uintptr
	ServerSpn uintptr
}
type
  AUTHZ_RPC_INIT_INFO_CLIENT = record
    version: Word;
    ObjectUuid: Pointer;
    ProtSeq: Pointer;
    NetworkAddr: Pointer;
    Endpoint: Pointer;
    Options: Pointer;
    ServerSpn: Pointer;
  end;
const AUTHZ_RPC_INIT_INFO_CLIENT = extern struct {
    version: u16,
    ObjectUuid: ?*anyopaque,
    ProtSeq: ?*anyopaque,
    NetworkAddr: ?*anyopaque,
    Endpoint: ?*anyopaque,
    Options: ?*anyopaque,
    ServerSpn: ?*anyopaque,
};
type
  AUTHZ_RPC_INIT_INFO_CLIENT {.bycopy.} = object
    version: uint16
    ObjectUuid: pointer
    ProtSeq: pointer
    NetworkAddr: pointer
    Endpoint: pointer
    Options: pointer
    ServerSpn: pointer
struct AUTHZ_RPC_INIT_INFO_CLIENT
{
    ushort version;
    void* ObjectUuid;
    void* ProtSeq;
    void* NetworkAddr;
    void* Endpoint;
    void* Options;
    void* ServerSpn;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; AUTHZ_RPC_INIT_INFO_CLIENT サイズ: 28 バイト(x86)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; version : WORD (+0, 2byte)  wpoke st,0,値  /  値 = wpeek(st,0)
; ObjectUuid : LPWSTR (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; ProtSeq : LPWSTR (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; NetworkAddr : LPWSTR (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; Endpoint : LPWSTR (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; Options : LPWSTR (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ServerSpn : LPWSTR (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; AUTHZ_RPC_INIT_INFO_CLIENT サイズ: 56 バイト(x64)
dim st, 14    ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; version : WORD (+0, 2byte)  wpoke st,0,値  /  値 = wpeek(st,0)
; ObjectUuid : LPWSTR (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ProtSeq : LPWSTR (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; NetworkAddr : LPWSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; Endpoint : LPWSTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; Options : LPWSTR (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ServerSpn : LPWSTR (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global AUTHZ_RPC_INIT_INFO_CLIENT
    #field short version
    #field intptr ObjectUuid
    #field intptr ProtSeq
    #field intptr NetworkAddr
    #field intptr Endpoint
    #field intptr Options
    #field intptr ServerSpn
#endstruct

stdim st, AUTHZ_RPC_INIT_INFO_CLIENT        ; NSTRUCT 変数を確保
st->version = 100
mes "version=" + st->version