ホーム › Security.Authentication.Identity › SecPkgCredentials_KdcNetworkSettingsW
SecPkgCredentials_KdcNetworkSettingsW
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 | 本構造体のバージョン番号。 |
| Flags | DWORD | 4 | +4 | +4 | KDCネットワーク設定の挙動を制御するビットフラグ。 |
| ProxyServerOffset | WORD | 2 | +8 | +8 | 構造体先頭からプロキシサーバー名文字列までのオフセット(バイト)。 |
| ProxyServerLength | WORD | 2 | +10 | +10 | プロキシサーバー名文字列の長さ(バイト数)。 |
| ClientTlsCredOffset | WORD | 2 | +12 | +12 | 構造体先頭からクライアントTLS資格情報名までのオフセット(バイト)。 |
| ClientTlsCredLength | WORD | 2 | +14 | +14 | クライアントTLS資格情報名の長さ(バイト数)。 |
| DcDiscoveryFlags | DWORD | 4 | +16 | +16 | ドメインコントローラー探索の挙動を制御するビットフラグ。 |
各言語での定義
#include <windows.h>
// SecPkgCredentials_KdcNetworkSettingsW (x64 20 / x86 20 バイト)
typedef struct SecPkgCredentials_KdcNetworkSettingsW {
DWORD Version;
DWORD Flags;
WORD ProxyServerOffset;
WORD ProxyServerLength;
WORD ClientTlsCredOffset;
WORD ClientTlsCredLength;
DWORD DcDiscoveryFlags;
} SecPkgCredentials_KdcNetworkSettingsW;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SecPkgCredentials_KdcNetworkSettingsW
{
public uint Version;
public uint Flags;
public ushort ProxyServerOffset;
public ushort ProxyServerLength;
public ushort ClientTlsCredOffset;
public ushort ClientTlsCredLength;
public uint DcDiscoveryFlags;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SecPkgCredentials_KdcNetworkSettingsW
Public Version As UInteger
Public Flags As UInteger
Public ProxyServerOffset As UShort
Public ProxyServerLength As UShort
Public ClientTlsCredOffset As UShort
Public ClientTlsCredLength As UShort
Public DcDiscoveryFlags As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SecPkgCredentials_KdcNetworkSettingsW(ctypes.Structure):
_fields_ = [
("Version", wintypes.DWORD),
("Flags", wintypes.DWORD),
("ProxyServerOffset", ctypes.c_ushort),
("ProxyServerLength", ctypes.c_ushort),
("ClientTlsCredOffset", ctypes.c_ushort),
("ClientTlsCredLength", ctypes.c_ushort),
("DcDiscoveryFlags", wintypes.DWORD),
]#[repr(C)]
pub struct SecPkgCredentials_KdcNetworkSettingsW {
pub Version: u32,
pub Flags: u32,
pub ProxyServerOffset: u16,
pub ProxyServerLength: u16,
pub ClientTlsCredOffset: u16,
pub ClientTlsCredLength: u16,
pub DcDiscoveryFlags: u32,
}import "golang.org/x/sys/windows"
type SecPkgCredentials_KdcNetworkSettingsW struct {
Version uint32
Flags uint32
ProxyServerOffset uint16
ProxyServerLength uint16
ClientTlsCredOffset uint16
ClientTlsCredLength uint16
DcDiscoveryFlags uint32
}type
SecPkgCredentials_KdcNetworkSettingsW = record
Version: DWORD;
Flags: DWORD;
ProxyServerOffset: Word;
ProxyServerLength: Word;
ClientTlsCredOffset: Word;
ClientTlsCredLength: Word;
DcDiscoveryFlags: DWORD;
end;const SecPkgCredentials_KdcNetworkSettingsW = extern struct {
Version: u32,
Flags: u32,
ProxyServerOffset: u16,
ProxyServerLength: u16,
ClientTlsCredOffset: u16,
ClientTlsCredLength: u16,
DcDiscoveryFlags: u32,
};type
SecPkgCredentials_KdcNetworkSettingsW {.bycopy.} = object
Version: uint32
Flags: uint32
ProxyServerOffset: uint16
ProxyServerLength: uint16
ClientTlsCredOffset: uint16
ClientTlsCredLength: uint16
DcDiscoveryFlags: uint32struct SecPkgCredentials_KdcNetworkSettingsW
{
uint Version;
uint Flags;
ushort ProxyServerOffset;
ushort ProxyServerLength;
ushort ClientTlsCredOffset;
ushort ClientTlsCredLength;
uint DcDiscoveryFlags;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SecPkgCredentials_KdcNetworkSettingsW サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Flags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ProxyServerOffset : WORD (+8, 2byte) wpoke st,8,値 / 値 = wpeek(st,8)
; ProxyServerLength : WORD (+10, 2byte) wpoke st,10,値 / 値 = wpeek(st,10)
; ClientTlsCredOffset : WORD (+12, 2byte) wpoke st,12,値 / 値 = wpeek(st,12)
; ClientTlsCredLength : WORD (+14, 2byte) wpoke st,14,値 / 値 = wpeek(st,14)
; DcDiscoveryFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SecPkgCredentials_KdcNetworkSettingsW
#field int Version
#field int Flags
#field short ProxyServerOffset
#field short ProxyServerLength
#field short ClientTlsCredOffset
#field short ClientTlsCredLength
#field int DcDiscoveryFlags
#endstruct
stdim st, SecPkgCredentials_KdcNetworkSettingsW ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version