Win32 API 日本語リファレンス
ホームNetworkManagement.NetManagement › NETLOGON_INFO_3

NETLOGON_INFO_3

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

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

フィールド

フィールドサイズx64x86説明
netlog3_flagsDWORD4+0+0Netlogonサービスの状態フラグ。NETLOGON_*ビットの組み合わせを表す。
netlog3_logon_attemptsDWORD4+4+4処理されたログオン試行回数を示す。
netlog3_reserved1DWORD4+8+8予約フィールド。将来利用のため0を設定する。
netlog3_reserved2DWORD4+12+12予約フィールド。将来利用のため0を設定する。
netlog3_reserved3DWORD4+16+16予約フィールド。将来利用のため0を設定する。
netlog3_reserved4DWORD4+20+20予約フィールド。将来利用のため0を設定する。
netlog3_reserved5DWORD4+24+24予約フィールド。将来利用のため0を設定する。

各言語での定義

#include <windows.h>

// NETLOGON_INFO_3  (x64 28 / x86 28 バイト)
typedef struct NETLOGON_INFO_3 {
    DWORD netlog3_flags;
    DWORD netlog3_logon_attempts;
    DWORD netlog3_reserved1;
    DWORD netlog3_reserved2;
    DWORD netlog3_reserved3;
    DWORD netlog3_reserved4;
    DWORD netlog3_reserved5;
} NETLOGON_INFO_3;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NETLOGON_INFO_3
{
    public uint netlog3_flags;
    public uint netlog3_logon_attempts;
    public uint netlog3_reserved1;
    public uint netlog3_reserved2;
    public uint netlog3_reserved3;
    public uint netlog3_reserved4;
    public uint netlog3_reserved5;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NETLOGON_INFO_3
    Public netlog3_flags As UInteger
    Public netlog3_logon_attempts As UInteger
    Public netlog3_reserved1 As UInteger
    Public netlog3_reserved2 As UInteger
    Public netlog3_reserved3 As UInteger
    Public netlog3_reserved4 As UInteger
    Public netlog3_reserved5 As UInteger
End Structure
import ctypes
from ctypes import wintypes

class NETLOGON_INFO_3(ctypes.Structure):
    _fields_ = [
        ("netlog3_flags", wintypes.DWORD),
        ("netlog3_logon_attempts", wintypes.DWORD),
        ("netlog3_reserved1", wintypes.DWORD),
        ("netlog3_reserved2", wintypes.DWORD),
        ("netlog3_reserved3", wintypes.DWORD),
        ("netlog3_reserved4", wintypes.DWORD),
        ("netlog3_reserved5", wintypes.DWORD),
    ]
#[repr(C)]
pub struct NETLOGON_INFO_3 {
    pub netlog3_flags: u32,
    pub netlog3_logon_attempts: u32,
    pub netlog3_reserved1: u32,
    pub netlog3_reserved2: u32,
    pub netlog3_reserved3: u32,
    pub netlog3_reserved4: u32,
    pub netlog3_reserved5: u32,
}
import "golang.org/x/sys/windows"

type NETLOGON_INFO_3 struct {
	netlog3_flags uint32
	netlog3_logon_attempts uint32
	netlog3_reserved1 uint32
	netlog3_reserved2 uint32
	netlog3_reserved3 uint32
	netlog3_reserved4 uint32
	netlog3_reserved5 uint32
}
type
  NETLOGON_INFO_3 = record
    netlog3_flags: DWORD;
    netlog3_logon_attempts: DWORD;
    netlog3_reserved1: DWORD;
    netlog3_reserved2: DWORD;
    netlog3_reserved3: DWORD;
    netlog3_reserved4: DWORD;
    netlog3_reserved5: DWORD;
  end;
const NETLOGON_INFO_3 = extern struct {
    netlog3_flags: u32,
    netlog3_logon_attempts: u32,
    netlog3_reserved1: u32,
    netlog3_reserved2: u32,
    netlog3_reserved3: u32,
    netlog3_reserved4: u32,
    netlog3_reserved5: u32,
};
type
  NETLOGON_INFO_3 {.bycopy.} = object
    netlog3_flags: uint32
    netlog3_logon_attempts: uint32
    netlog3_reserved1: uint32
    netlog3_reserved2: uint32
    netlog3_reserved3: uint32
    netlog3_reserved4: uint32
    netlog3_reserved5: uint32
struct NETLOGON_INFO_3
{
    uint netlog3_flags;
    uint netlog3_logon_attempts;
    uint netlog3_reserved1;
    uint netlog3_reserved2;
    uint netlog3_reserved3;
    uint netlog3_reserved4;
    uint netlog3_reserved5;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NETLOGON_INFO_3 サイズ: 28 バイト(x64)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; netlog3_flags : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; netlog3_logon_attempts : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; netlog3_reserved1 : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; netlog3_reserved2 : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; netlog3_reserved3 : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; netlog3_reserved4 : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; netlog3_reserved5 : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NETLOGON_INFO_3
    #field int netlog3_flags
    #field int netlog3_logon_attempts
    #field int netlog3_reserved1
    #field int netlog3_reserved2
    #field int netlog3_reserved3
    #field int netlog3_reserved4
    #field int netlog3_reserved5
#endstruct

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