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

AE_LOCKOUT

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

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

フィールド

フィールドサイズx64x86説明
ae_lk_compnameDWORD4+0+0ロックアウトが発生したコンピューター名へのオフセットを示す。
ae_lk_usernameDWORD4+4+4ロックアウトされたユーザー名へのオフセットを示す。
ae_lk_actionDWORD4+8+8ロックアウトに関連して実行された操作の種別を示す。
ae_lk_bad_pw_countDWORD4+12+12ロックアウトに至った不正パスワード入力回数を示す。

各言語での定義

#include <windows.h>

// AE_LOCKOUT  (x64 16 / x86 16 バイト)
typedef struct AE_LOCKOUT {
    DWORD ae_lk_compname;
    DWORD ae_lk_username;
    DWORD ae_lk_action;
    DWORD ae_lk_bad_pw_count;
} AE_LOCKOUT;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct AE_LOCKOUT
{
    public uint ae_lk_compname;
    public uint ae_lk_username;
    public uint ae_lk_action;
    public uint ae_lk_bad_pw_count;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure AE_LOCKOUT
    Public ae_lk_compname As UInteger
    Public ae_lk_username As UInteger
    Public ae_lk_action As UInteger
    Public ae_lk_bad_pw_count As UInteger
End Structure
import ctypes
from ctypes import wintypes

class AE_LOCKOUT(ctypes.Structure):
    _fields_ = [
        ("ae_lk_compname", wintypes.DWORD),
        ("ae_lk_username", wintypes.DWORD),
        ("ae_lk_action", wintypes.DWORD),
        ("ae_lk_bad_pw_count", wintypes.DWORD),
    ]
#[repr(C)]
pub struct AE_LOCKOUT {
    pub ae_lk_compname: u32,
    pub ae_lk_username: u32,
    pub ae_lk_action: u32,
    pub ae_lk_bad_pw_count: u32,
}
import "golang.org/x/sys/windows"

type AE_LOCKOUT struct {
	ae_lk_compname uint32
	ae_lk_username uint32
	ae_lk_action uint32
	ae_lk_bad_pw_count uint32
}
type
  AE_LOCKOUT = record
    ae_lk_compname: DWORD;
    ae_lk_username: DWORD;
    ae_lk_action: DWORD;
    ae_lk_bad_pw_count: DWORD;
  end;
const AE_LOCKOUT = extern struct {
    ae_lk_compname: u32,
    ae_lk_username: u32,
    ae_lk_action: u32,
    ae_lk_bad_pw_count: u32,
};
type
  AE_LOCKOUT {.bycopy.} = object
    ae_lk_compname: uint32
    ae_lk_username: uint32
    ae_lk_action: uint32
    ae_lk_bad_pw_count: uint32
struct AE_LOCKOUT
{
    uint ae_lk_compname;
    uint ae_lk_username;
    uint ae_lk_action;
    uint ae_lk_bad_pw_count;
}

HSP用 定義

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

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

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