ホーム › Security.Authentication.Identity › TRUSTED_DOMAIN_AUTH_INFORMATION
TRUSTED_DOMAIN_AUTH_INFORMATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| IncomingAuthInfos | DWORD | 4 | +0 | +0 | IncomingAuthenticationInformation 配列および IncomingPreviousAuthenticationInformation 配列のエントリ数を指定します。 |
| IncomingAuthenticationInformation | LSA_AUTH_INFORMATION* | 8/4 | +8 | +4 | 信頼関係の受信側の認証情報を格納する LSA_AUTH_INFORMATION 構造体の配列へのポインターです。 |
| IncomingPreviousAuthenticationInformation | LSA_AUTH_INFORMATION* | 8/4 | +16 | +8 | 信頼関係の受信側の以前の認証情報 (古いパスワード) を格納する LSA_AUTH_INFORMATION 構造体の配列へのポインターです。IncomingAuthenticationInformation 配列のすべてのエントリに対して、それぞれ 1 つずつ必要です。 |
| OutgoingAuthInfos | DWORD | 4 | +24 | +12 | OutgoingAuthenticationInformation 配列および OutgoingPreviousAuthenticationInformation 配列のエントリ数を指定します。 |
| OutgoingAuthenticationInformation | LSA_AUTH_INFORMATION* | 8/4 | +32 | +16 | 信頼関係の送信側の認証情報を格納する LSA_AUTH_INFORMATION 構造体の配列へのポインターです。 |
| OutgoingPreviousAuthenticationInformation | LSA_AUTH_INFORMATION* | 8/4 | +40 | +20 | 信頼関係の送信側の以前の認証情報 (古いパスワード) を格納する LSA_AUTH_INFORMATION 構造体の配列へのポインターです。OutgoingAuthenticationInformation 配列のすべてのエントリに対して、それぞれ 1 つずつ必要です。 |
公式ドキュメント
TRUSTED_DOMAIN_AUTH_INFORMATION 構造体は、信頼されたドメインの認証情報を取得するために使用します。 LsaQueryTrustedDomainInfo 関数は、InformationClass パラメーターが TrustedDomainAuthInformation に設定されている場合にこの構造体を使用します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// TRUSTED_DOMAIN_AUTH_INFORMATION (x64 48 / x86 24 バイト)
typedef struct TRUSTED_DOMAIN_AUTH_INFORMATION {
DWORD IncomingAuthInfos;
LSA_AUTH_INFORMATION* IncomingAuthenticationInformation;
LSA_AUTH_INFORMATION* IncomingPreviousAuthenticationInformation;
DWORD OutgoingAuthInfos;
LSA_AUTH_INFORMATION* OutgoingAuthenticationInformation;
LSA_AUTH_INFORMATION* OutgoingPreviousAuthenticationInformation;
} TRUSTED_DOMAIN_AUTH_INFORMATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TRUSTED_DOMAIN_AUTH_INFORMATION
{
public uint IncomingAuthInfos;
public IntPtr IncomingAuthenticationInformation;
public IntPtr IncomingPreviousAuthenticationInformation;
public uint OutgoingAuthInfos;
public IntPtr OutgoingAuthenticationInformation;
public IntPtr OutgoingPreviousAuthenticationInformation;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TRUSTED_DOMAIN_AUTH_INFORMATION
Public IncomingAuthInfos As UInteger
Public IncomingAuthenticationInformation As IntPtr
Public IncomingPreviousAuthenticationInformation As IntPtr
Public OutgoingAuthInfos As UInteger
Public OutgoingAuthenticationInformation As IntPtr
Public OutgoingPreviousAuthenticationInformation As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class TRUSTED_DOMAIN_AUTH_INFORMATION(ctypes.Structure):
_fields_ = [
("IncomingAuthInfos", wintypes.DWORD),
("IncomingAuthenticationInformation", ctypes.c_void_p),
("IncomingPreviousAuthenticationInformation", ctypes.c_void_p),
("OutgoingAuthInfos", wintypes.DWORD),
("OutgoingAuthenticationInformation", ctypes.c_void_p),
("OutgoingPreviousAuthenticationInformation", ctypes.c_void_p),
]#[repr(C)]
pub struct TRUSTED_DOMAIN_AUTH_INFORMATION {
pub IncomingAuthInfos: u32,
pub IncomingAuthenticationInformation: *mut core::ffi::c_void,
pub IncomingPreviousAuthenticationInformation: *mut core::ffi::c_void,
pub OutgoingAuthInfos: u32,
pub OutgoingAuthenticationInformation: *mut core::ffi::c_void,
pub OutgoingPreviousAuthenticationInformation: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type TRUSTED_DOMAIN_AUTH_INFORMATION struct {
IncomingAuthInfos uint32
IncomingAuthenticationInformation uintptr
IncomingPreviousAuthenticationInformation uintptr
OutgoingAuthInfos uint32
OutgoingAuthenticationInformation uintptr
OutgoingPreviousAuthenticationInformation uintptr
}type
TRUSTED_DOMAIN_AUTH_INFORMATION = record
IncomingAuthInfos: DWORD;
IncomingAuthenticationInformation: Pointer;
IncomingPreviousAuthenticationInformation: Pointer;
OutgoingAuthInfos: DWORD;
OutgoingAuthenticationInformation: Pointer;
OutgoingPreviousAuthenticationInformation: Pointer;
end;const TRUSTED_DOMAIN_AUTH_INFORMATION = extern struct {
IncomingAuthInfos: u32,
IncomingAuthenticationInformation: ?*anyopaque,
IncomingPreviousAuthenticationInformation: ?*anyopaque,
OutgoingAuthInfos: u32,
OutgoingAuthenticationInformation: ?*anyopaque,
OutgoingPreviousAuthenticationInformation: ?*anyopaque,
};type
TRUSTED_DOMAIN_AUTH_INFORMATION {.bycopy.} = object
IncomingAuthInfos: uint32
IncomingAuthenticationInformation: pointer
IncomingPreviousAuthenticationInformation: pointer
OutgoingAuthInfos: uint32
OutgoingAuthenticationInformation: pointer
OutgoingPreviousAuthenticationInformation: pointerstruct TRUSTED_DOMAIN_AUTH_INFORMATION
{
uint IncomingAuthInfos;
void* IncomingAuthenticationInformation;
void* IncomingPreviousAuthenticationInformation;
uint OutgoingAuthInfos;
void* OutgoingAuthenticationInformation;
void* OutgoingPreviousAuthenticationInformation;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; TRUSTED_DOMAIN_AUTH_INFORMATION サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; IncomingAuthInfos : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; IncomingAuthenticationInformation : LSA_AUTH_INFORMATION* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; IncomingPreviousAuthenticationInformation : LSA_AUTH_INFORMATION* (+8, 4byte) varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; OutgoingAuthInfos : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; OutgoingAuthenticationInformation : LSA_AUTH_INFORMATION* (+16, 4byte) varptr(st)+16 を基点に操作(4byte:入れ子/配列)
; OutgoingPreviousAuthenticationInformation : LSA_AUTH_INFORMATION* (+20, 4byte) varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TRUSTED_DOMAIN_AUTH_INFORMATION サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; IncomingAuthInfos : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; IncomingAuthenticationInformation : LSA_AUTH_INFORMATION* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; IncomingPreviousAuthenticationInformation : LSA_AUTH_INFORMATION* (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; OutgoingAuthInfos : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; OutgoingAuthenticationInformation : LSA_AUTH_INFORMATION* (+32, 8byte) varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; OutgoingPreviousAuthenticationInformation : LSA_AUTH_INFORMATION* (+40, 8byte) varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global TRUSTED_DOMAIN_AUTH_INFORMATION
#field int IncomingAuthInfos
#field intptr IncomingAuthenticationInformation
#field intptr IncomingPreviousAuthenticationInformation
#field int OutgoingAuthInfos
#field intptr OutgoingAuthenticationInformation
#field intptr OutgoingPreviousAuthenticationInformation
#endstruct
stdim st, TRUSTED_DOMAIN_AUTH_INFORMATION ; NSTRUCT 変数を確保
st->IncomingAuthInfos = 100
mes "IncomingAuthInfos=" + st->IncomingAuthInfos