ホーム › NetworkManagement.NetManagement › NETLOGON_INFO_2
NETLOGON_INFO_2
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| netlog2_flags | DWORD | 4 | +0 | +0 | DC からの制御クエリ応答を 1 つ以上格納する整数値です。
| ||||||||||||||||||
| netlog2_pdc_connection_status | DWORD | 4 | +4 | +4 | Lmerr.h で定義されている、値が 2100 より大きい状態コードを格納する列挙型の整数値です。netlog2_flags に NETLOGON_VERIFY_STATUS_RETURNED が設定されている場合、この値はすべてのドメインメンバーをまとめた信頼関係の検証状態を表します。 | ||||||||||||||||||
| netlog2_trusted_dc_name | LPWSTR | 8/4 | +8 | +8 | 信頼されたドメインコントローラーの名前を含む文字列への、マーシャリングされたポインターです。 | ||||||||||||||||||
| netlog2_tc_connection_status | DWORD | 4 | +16 | +12 | Lmerr.h で定義されている、値が 2100 より大きい状態コードを格納する列挙型の整数値です。このコードは、指定された信頼された DC へのセキュリティで保護されたチャネルの状態を示します。 |
公式ドキュメント
NETLOGON_INFO_2 構造体は、ドメインコントローラーからのレベル 2 の制御クエリ応答を定義します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// NETLOGON_INFO_2 (x64 24 / x86 16 バイト)
typedef struct NETLOGON_INFO_2 {
DWORD netlog2_flags;
DWORD netlog2_pdc_connection_status;
LPWSTR netlog2_trusted_dc_name;
DWORD netlog2_tc_connection_status;
} NETLOGON_INFO_2;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NETLOGON_INFO_2
{
public uint netlog2_flags;
public uint netlog2_pdc_connection_status;
public IntPtr netlog2_trusted_dc_name;
public uint netlog2_tc_connection_status;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NETLOGON_INFO_2
Public netlog2_flags As UInteger
Public netlog2_pdc_connection_status As UInteger
Public netlog2_trusted_dc_name As IntPtr
Public netlog2_tc_connection_status As UInteger
End Structureimport ctypes
from ctypes import wintypes
class NETLOGON_INFO_2(ctypes.Structure):
_fields_ = [
("netlog2_flags", wintypes.DWORD),
("netlog2_pdc_connection_status", wintypes.DWORD),
("netlog2_trusted_dc_name", ctypes.c_void_p),
("netlog2_tc_connection_status", wintypes.DWORD),
]#[repr(C)]
pub struct NETLOGON_INFO_2 {
pub netlog2_flags: u32,
pub netlog2_pdc_connection_status: u32,
pub netlog2_trusted_dc_name: *mut core::ffi::c_void,
pub netlog2_tc_connection_status: u32,
}import "golang.org/x/sys/windows"
type NETLOGON_INFO_2 struct {
netlog2_flags uint32
netlog2_pdc_connection_status uint32
netlog2_trusted_dc_name uintptr
netlog2_tc_connection_status uint32
}type
NETLOGON_INFO_2 = record
netlog2_flags: DWORD;
netlog2_pdc_connection_status: DWORD;
netlog2_trusted_dc_name: Pointer;
netlog2_tc_connection_status: DWORD;
end;const NETLOGON_INFO_2 = extern struct {
netlog2_flags: u32,
netlog2_pdc_connection_status: u32,
netlog2_trusted_dc_name: ?*anyopaque,
netlog2_tc_connection_status: u32,
};type
NETLOGON_INFO_2 {.bycopy.} = object
netlog2_flags: uint32
netlog2_pdc_connection_status: uint32
netlog2_trusted_dc_name: pointer
netlog2_tc_connection_status: uint32struct NETLOGON_INFO_2
{
uint netlog2_flags;
uint netlog2_pdc_connection_status;
void* netlog2_trusted_dc_name;
uint netlog2_tc_connection_status;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; NETLOGON_INFO_2 サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; netlog2_flags : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; netlog2_pdc_connection_status : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; netlog2_trusted_dc_name : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; netlog2_tc_connection_status : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NETLOGON_INFO_2 サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; netlog2_flags : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; netlog2_pdc_connection_status : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; netlog2_trusted_dc_name : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; netlog2_tc_connection_status : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NETLOGON_INFO_2
#field int netlog2_flags
#field int netlog2_pdc_connection_status
#field intptr netlog2_trusted_dc_name
#field int netlog2_tc_connection_status
#endstruct
stdim st, NETLOGON_INFO_2 ; NSTRUCT 変数を確保
st->netlog2_flags = 100
mes "netlog2_flags=" + st->netlog2_flags