ホーム › Networking.ActiveDirectory › DS_REPL_NEIGHBORW_BLOB
DS_REPL_NEIGHBORW_BLOB
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| oszNamingContext | DWORD | 4 | +0 | +0 | ブロブ先頭から名前付けコンテキスト文字列までのバイトオフセット。 |
| oszSourceDsaDN | DWORD | 4 | +4 | +4 | ブロブ先頭から複製元DSAのDN文字列までのバイトオフセット。 |
| oszSourceDsaAddress | DWORD | 4 | +8 | +8 | ブロブ先頭から複製元DSAアドレス文字列までのバイトオフセット。 |
| oszAsyncIntersiteTransportDN | DWORD | 4 | +12 | +12 | ブロブ先頭から非同期サイト間トランスポートDNまでのバイトオフセット。 |
| dwReplicaFlags | DWORD | 4 | +16 | +16 | この複製接続の属性を示すフラグ。 |
| dwReserved | DWORD | 4 | +20 | +20 | 予約フィールド。0となる。 |
| uuidNamingContextObjGuid | GUID | 16 | +24 | +24 | 名前付けコンテキストオブジェクトのGUID。 |
| uuidSourceDsaObjGuid | GUID | 16 | +40 | +40 | 複製元DSAオブジェクトのGUID。 |
| uuidSourceDsaInvocationID | GUID | 16 | +56 | +56 | 複製元DSAの呼び出しID(invocationID)。 |
| uuidAsyncIntersiteTransportObjGuid | GUID | 16 | +72 | +72 | 非同期サイト間トランスポートオブジェクトのGUID。 |
| usnLastObjChangeSynced | LONGLONG | 8 | +88 | +88 | 最後に同期したオブジェクト変更のUSN。 |
| usnAttributeFilter | LONGLONG | 8 | +96 | +96 | 属性フィルタとして用いるUSNの基準値。 |
| ftimeLastSyncSuccess | FILETIME | 8 | +104 | +104 | 最後に同期に成功した日時(FILETIME)。 |
| ftimeLastSyncAttempt | FILETIME | 8 | +112 | +112 | 最後に同期を試行した日時(FILETIME)。 |
| dwLastSyncResult | DWORD | 4 | +120 | +120 | 直近の同期試行の結果コード(Win32エラー)。 |
| cNumConsecutiveSyncFailures | DWORD | 4 | +124 | +124 | 連続して同期に失敗した回数。 |
各言語での定義
#include <windows.h>
// FILETIME (x64 8 / x86 8 バイト)
typedef struct FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME;
// DS_REPL_NEIGHBORW_BLOB (x64 128 / x86 128 バイト)
typedef struct DS_REPL_NEIGHBORW_BLOB {
DWORD oszNamingContext;
DWORD oszSourceDsaDN;
DWORD oszSourceDsaAddress;
DWORD oszAsyncIntersiteTransportDN;
DWORD dwReplicaFlags;
DWORD dwReserved;
GUID uuidNamingContextObjGuid;
GUID uuidSourceDsaObjGuid;
GUID uuidSourceDsaInvocationID;
GUID uuidAsyncIntersiteTransportObjGuid;
LONGLONG usnLastObjChangeSynced;
LONGLONG usnAttributeFilter;
FILETIME ftimeLastSyncSuccess;
FILETIME ftimeLastSyncAttempt;
DWORD dwLastSyncResult;
DWORD cNumConsecutiveSyncFailures;
} DS_REPL_NEIGHBORW_BLOB;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FILETIME
{
public uint dwLowDateTime;
public uint dwHighDateTime;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DS_REPL_NEIGHBORW_BLOB
{
public uint oszNamingContext;
public uint oszSourceDsaDN;
public uint oszSourceDsaAddress;
public uint oszAsyncIntersiteTransportDN;
public uint dwReplicaFlags;
public uint dwReserved;
public Guid uuidNamingContextObjGuid;
public Guid uuidSourceDsaObjGuid;
public Guid uuidSourceDsaInvocationID;
public Guid uuidAsyncIntersiteTransportObjGuid;
public long usnLastObjChangeSynced;
public long usnAttributeFilter;
public FILETIME ftimeLastSyncSuccess;
public FILETIME ftimeLastSyncAttempt;
public uint dwLastSyncResult;
public uint cNumConsecutiveSyncFailures;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FILETIME
Public dwLowDateTime As UInteger
Public dwHighDateTime As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DS_REPL_NEIGHBORW_BLOB
Public oszNamingContext As UInteger
Public oszSourceDsaDN As UInteger
Public oszSourceDsaAddress As UInteger
Public oszAsyncIntersiteTransportDN As UInteger
Public dwReplicaFlags As UInteger
Public dwReserved As UInteger
Public uuidNamingContextObjGuid As Guid
Public uuidSourceDsaObjGuid As Guid
Public uuidSourceDsaInvocationID As Guid
Public uuidAsyncIntersiteTransportObjGuid As Guid
Public usnLastObjChangeSynced As Long
Public usnAttributeFilter As Long
Public ftimeLastSyncSuccess As FILETIME
Public ftimeLastSyncAttempt As FILETIME
Public dwLastSyncResult As UInteger
Public cNumConsecutiveSyncFailures As UInteger
End Structureimport ctypes
from ctypes import wintypes
class FILETIME(ctypes.Structure):
_fields_ = [
("dwLowDateTime", wintypes.DWORD),
("dwHighDateTime", wintypes.DWORD),
]
class DS_REPL_NEIGHBORW_BLOB(ctypes.Structure):
_fields_ = [
("oszNamingContext", wintypes.DWORD),
("oszSourceDsaDN", wintypes.DWORD),
("oszSourceDsaAddress", wintypes.DWORD),
("oszAsyncIntersiteTransportDN", wintypes.DWORD),
("dwReplicaFlags", wintypes.DWORD),
("dwReserved", wintypes.DWORD),
("uuidNamingContextObjGuid", GUID),
("uuidSourceDsaObjGuid", GUID),
("uuidSourceDsaInvocationID", GUID),
("uuidAsyncIntersiteTransportObjGuid", GUID),
("usnLastObjChangeSynced", ctypes.c_longlong),
("usnAttributeFilter", ctypes.c_longlong),
("ftimeLastSyncSuccess", FILETIME),
("ftimeLastSyncAttempt", FILETIME),
("dwLastSyncResult", wintypes.DWORD),
("cNumConsecutiveSyncFailures", wintypes.DWORD),
]#[repr(C)]
pub struct FILETIME {
pub dwLowDateTime: u32,
pub dwHighDateTime: u32,
}
#[repr(C)]
pub struct DS_REPL_NEIGHBORW_BLOB {
pub oszNamingContext: u32,
pub oszSourceDsaDN: u32,
pub oszSourceDsaAddress: u32,
pub oszAsyncIntersiteTransportDN: u32,
pub dwReplicaFlags: u32,
pub dwReserved: u32,
pub uuidNamingContextObjGuid: GUID,
pub uuidSourceDsaObjGuid: GUID,
pub uuidSourceDsaInvocationID: GUID,
pub uuidAsyncIntersiteTransportObjGuid: GUID,
pub usnLastObjChangeSynced: i64,
pub usnAttributeFilter: i64,
pub ftimeLastSyncSuccess: FILETIME,
pub ftimeLastSyncAttempt: FILETIME,
pub dwLastSyncResult: u32,
pub cNumConsecutiveSyncFailures: u32,
}import "golang.org/x/sys/windows"
type FILETIME struct {
dwLowDateTime uint32
dwHighDateTime uint32
}
type DS_REPL_NEIGHBORW_BLOB struct {
oszNamingContext uint32
oszSourceDsaDN uint32
oszSourceDsaAddress uint32
oszAsyncIntersiteTransportDN uint32
dwReplicaFlags uint32
dwReserved uint32
uuidNamingContextObjGuid windows.GUID
uuidSourceDsaObjGuid windows.GUID
uuidSourceDsaInvocationID windows.GUID
uuidAsyncIntersiteTransportObjGuid windows.GUID
usnLastObjChangeSynced int64
usnAttributeFilter int64
ftimeLastSyncSuccess FILETIME
ftimeLastSyncAttempt FILETIME
dwLastSyncResult uint32
cNumConsecutiveSyncFailures uint32
}type
FILETIME = record
dwLowDateTime: DWORD;
dwHighDateTime: DWORD;
end;
DS_REPL_NEIGHBORW_BLOB = record
oszNamingContext: DWORD;
oszSourceDsaDN: DWORD;
oszSourceDsaAddress: DWORD;
oszAsyncIntersiteTransportDN: DWORD;
dwReplicaFlags: DWORD;
dwReserved: DWORD;
uuidNamingContextObjGuid: TGUID;
uuidSourceDsaObjGuid: TGUID;
uuidSourceDsaInvocationID: TGUID;
uuidAsyncIntersiteTransportObjGuid: TGUID;
usnLastObjChangeSynced: Int64;
usnAttributeFilter: Int64;
ftimeLastSyncSuccess: FILETIME;
ftimeLastSyncAttempt: FILETIME;
dwLastSyncResult: DWORD;
cNumConsecutiveSyncFailures: DWORD;
end;const FILETIME = extern struct {
dwLowDateTime: u32,
dwHighDateTime: u32,
};
const DS_REPL_NEIGHBORW_BLOB = extern struct {
oszNamingContext: u32,
oszSourceDsaDN: u32,
oszSourceDsaAddress: u32,
oszAsyncIntersiteTransportDN: u32,
dwReplicaFlags: u32,
dwReserved: u32,
uuidNamingContextObjGuid: GUID,
uuidSourceDsaObjGuid: GUID,
uuidSourceDsaInvocationID: GUID,
uuidAsyncIntersiteTransportObjGuid: GUID,
usnLastObjChangeSynced: i64,
usnAttributeFilter: i64,
ftimeLastSyncSuccess: FILETIME,
ftimeLastSyncAttempt: FILETIME,
dwLastSyncResult: u32,
cNumConsecutiveSyncFailures: u32,
};type
FILETIME {.bycopy.} = object
dwLowDateTime: uint32
dwHighDateTime: uint32
DS_REPL_NEIGHBORW_BLOB {.bycopy.} = object
oszNamingContext: uint32
oszSourceDsaDN: uint32
oszSourceDsaAddress: uint32
oszAsyncIntersiteTransportDN: uint32
dwReplicaFlags: uint32
dwReserved: uint32
uuidNamingContextObjGuid: GUID
uuidSourceDsaObjGuid: GUID
uuidSourceDsaInvocationID: GUID
uuidAsyncIntersiteTransportObjGuid: GUID
usnLastObjChangeSynced: int64
usnAttributeFilter: int64
ftimeLastSyncSuccess: FILETIME
ftimeLastSyncAttempt: FILETIME
dwLastSyncResult: uint32
cNumConsecutiveSyncFailures: uint32struct FILETIME
{
uint dwLowDateTime;
uint dwHighDateTime;
}
struct DS_REPL_NEIGHBORW_BLOB
{
uint oszNamingContext;
uint oszSourceDsaDN;
uint oszSourceDsaAddress;
uint oszAsyncIntersiteTransportDN;
uint dwReplicaFlags;
uint dwReserved;
GUID uuidNamingContextObjGuid;
GUID uuidSourceDsaObjGuid;
GUID uuidSourceDsaInvocationID;
GUID uuidAsyncIntersiteTransportObjGuid;
long usnLastObjChangeSynced;
long usnAttributeFilter;
FILETIME ftimeLastSyncSuccess;
FILETIME ftimeLastSyncAttempt;
uint dwLastSyncResult;
uint cNumConsecutiveSyncFailures;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DS_REPL_NEIGHBORW_BLOB サイズ: 128 バイト(x64)
dim st, 32 ; 4byte整数×32(構造体サイズ 128 / 4 切り上げ)
; oszNamingContext : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; oszSourceDsaDN : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; oszSourceDsaAddress : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; oszAsyncIntersiteTransportDN : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwReplicaFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwReserved : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; uuidNamingContextObjGuid : GUID (+24, 16byte) varptr(st)+24 を基点に操作(16byte:入れ子/配列)
; uuidSourceDsaObjGuid : GUID (+40, 16byte) varptr(st)+40 を基点に操作(16byte:入れ子/配列)
; uuidSourceDsaInvocationID : GUID (+56, 16byte) varptr(st)+56 を基点に操作(16byte:入れ子/配列)
; uuidAsyncIntersiteTransportObjGuid : GUID (+72, 16byte) varptr(st)+72 を基点に操作(16byte:入れ子/配列)
; usnLastObjChangeSynced : LONGLONG (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; usnAttributeFilter : LONGLONG (+96, 8byte) qpoke st,96,値 / qpeek(st,96) ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; ftimeLastSyncSuccess : FILETIME (+104, 8byte) varptr(st)+104 を基点に操作(8byte:入れ子/配列)
; ftimeLastSyncAttempt : FILETIME (+112, 8byte) varptr(st)+112 を基点に操作(8byte:入れ子/配列)
; dwLastSyncResult : DWORD (+120, 4byte) st.30 = 値 / 値 = st.30 (lpoke/lpeek も可)
; cNumConsecutiveSyncFailures : DWORD (+124, 4byte) st.31 = 値 / 値 = st.31 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global FILETIME
#field int dwLowDateTime
#field int dwHighDateTime
#endstruct
#defstruct global DS_REPL_NEIGHBORW_BLOB
#field int oszNamingContext
#field int oszSourceDsaDN
#field int oszSourceDsaAddress
#field int oszAsyncIntersiteTransportDN
#field int dwReplicaFlags
#field int dwReserved
#field GUID uuidNamingContextObjGuid
#field GUID uuidSourceDsaObjGuid
#field GUID uuidSourceDsaInvocationID
#field GUID uuidAsyncIntersiteTransportObjGuid
#field int64 usnLastObjChangeSynced
#field int64 usnAttributeFilter
#field FILETIME ftimeLastSyncSuccess
#field FILETIME ftimeLastSyncAttempt
#field int dwLastSyncResult
#field int cNumConsecutiveSyncFailures
#endstruct
stdim st, DS_REPL_NEIGHBORW_BLOB ; NSTRUCT 変数を確保
st->oszNamingContext = 100
mes "oszNamingContext=" + st->oszNamingContext