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

USER_INFO_4

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

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

フィールド

フィールドサイズx64x86説明
usri4_nameLPWSTR8/4+0+0ユーザーアカウント名。
usri4_passwordLPWSTR8/4+8+4アカウントのパスワード。取得時は通常空文字。
usri4_password_ageDWORD4+16+8前回のパスワード変更からの経過時間(秒)。
usri4_privUSER_PRIV4+20+12ユーザーの権限レベル(ゲスト/ユーザー/管理者)。
usri4_home_dirLPWSTR8/4+24+16ホームディレクトリのパス。
usri4_commentLPWSTR8/4+32+20アカウントのコメント。
usri4_flagsUSER_ACCOUNT_FLAGS4+40+24アカウントの動作と状態を示すフラグ。
usri4_script_pathLPWSTR8/4+48+28ログオンスクリプトのパス。
usri4_auth_flagsAF_OP4+56+32操作者(管理)権限を示す認可フラグ。
usri4_full_nameLPWSTR8/4+64+36ユーザーのフルネーム。
usri4_usr_commentLPWSTR8/4+72+40ユーザー自身が設定するコメント。
usri4_parmsLPWSTR8/4+80+44アプリケーション固有のパラメータ領域。
usri4_workstationsLPWSTR8/4+88+48ログオンを許可するワークステーション一覧(カンマ区切り)。
usri4_last_logonDWORD4+96+52最後にログオンした日時(1970年起算秒)。
usri4_last_logoffDWORD4+100+56最後にログオフした日時(1970年起算秒)。
usri4_acct_expiresDWORD4+104+60アカウント有効期限(秒)。TIMEQ_FOREVERで無期限。
usri4_max_storageDWORD4+108+64ユーザーに許可される最大ディスク容量(バイト)。
usri4_units_per_weekDWORD4+112+68ログオン時間を表す週あたりの単位数。
usri4_logon_hoursBYTE*8/4+120+72ログオン可能時間帯を表すビットマップへのポインタ。
usri4_bad_pw_countDWORD4+128+76誤ったパスワード入力の回数。
usri4_num_logonsDWORD4+132+80このアカウントの累計ログオン回数。
usri4_logon_serverLPWSTR8/4+136+84ログオンを処理するサーバー名。
usri4_country_codeDWORD4+144+88ユーザーの国コード。
usri4_code_pageDWORD4+148+92ユーザーのコードページ。
usri4_user_sidPSID8/4+152+96ユーザーのセキュリティ識別子(SID)。
usri4_primary_group_idDWORD4+160+100ユーザーのプライマリグループのRID。
usri4_profileLPWSTR8/4+168+104ユーザープロファイルのパス。
usri4_home_dir_driveLPWSTR8/4+176+108ホームディレクトリに割り当てるドライブ文字。
usri4_password_expiredDWORD4+184+112パスワードが期限切れかを示す(非0で要変更)。

各言語での定義

#include <windows.h>

// USER_INFO_4  (x64 192 / x86 116 バイト)
typedef struct USER_INFO_4 {
    LPWSTR usri4_name;
    LPWSTR usri4_password;
    DWORD usri4_password_age;
    USER_PRIV usri4_priv;
    LPWSTR usri4_home_dir;
    LPWSTR usri4_comment;
    USER_ACCOUNT_FLAGS usri4_flags;
    LPWSTR usri4_script_path;
    AF_OP usri4_auth_flags;
    LPWSTR usri4_full_name;
    LPWSTR usri4_usr_comment;
    LPWSTR usri4_parms;
    LPWSTR usri4_workstations;
    DWORD usri4_last_logon;
    DWORD usri4_last_logoff;
    DWORD usri4_acct_expires;
    DWORD usri4_max_storage;
    DWORD usri4_units_per_week;
    BYTE* usri4_logon_hours;
    DWORD usri4_bad_pw_count;
    DWORD usri4_num_logons;
    LPWSTR usri4_logon_server;
    DWORD usri4_country_code;
    DWORD usri4_code_page;
    PSID usri4_user_sid;
    DWORD usri4_primary_group_id;
    LPWSTR usri4_profile;
    LPWSTR usri4_home_dir_drive;
    DWORD usri4_password_expired;
} USER_INFO_4;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct USER_INFO_4
{
    public IntPtr usri4_name;
    public IntPtr usri4_password;
    public uint usri4_password_age;
    public uint usri4_priv;
    public IntPtr usri4_home_dir;
    public IntPtr usri4_comment;
    public uint usri4_flags;
    public IntPtr usri4_script_path;
    public uint usri4_auth_flags;
    public IntPtr usri4_full_name;
    public IntPtr usri4_usr_comment;
    public IntPtr usri4_parms;
    public IntPtr usri4_workstations;
    public uint usri4_last_logon;
    public uint usri4_last_logoff;
    public uint usri4_acct_expires;
    public uint usri4_max_storage;
    public uint usri4_units_per_week;
    public IntPtr usri4_logon_hours;
    public uint usri4_bad_pw_count;
    public uint usri4_num_logons;
    public IntPtr usri4_logon_server;
    public uint usri4_country_code;
    public uint usri4_code_page;
    public IntPtr usri4_user_sid;
    public uint usri4_primary_group_id;
    public IntPtr usri4_profile;
    public IntPtr usri4_home_dir_drive;
    public uint usri4_password_expired;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure USER_INFO_4
    Public usri4_name As IntPtr
    Public usri4_password As IntPtr
    Public usri4_password_age As UInteger
    Public usri4_priv As UInteger
    Public usri4_home_dir As IntPtr
    Public usri4_comment As IntPtr
    Public usri4_flags As UInteger
    Public usri4_script_path As IntPtr
    Public usri4_auth_flags As UInteger
    Public usri4_full_name As IntPtr
    Public usri4_usr_comment As IntPtr
    Public usri4_parms As IntPtr
    Public usri4_workstations As IntPtr
    Public usri4_last_logon As UInteger
    Public usri4_last_logoff As UInteger
    Public usri4_acct_expires As UInteger
    Public usri4_max_storage As UInteger
    Public usri4_units_per_week As UInteger
    Public usri4_logon_hours As IntPtr
    Public usri4_bad_pw_count As UInteger
    Public usri4_num_logons As UInteger
    Public usri4_logon_server As IntPtr
    Public usri4_country_code As UInteger
    Public usri4_code_page As UInteger
    Public usri4_user_sid As IntPtr
    Public usri4_primary_group_id As UInteger
    Public usri4_profile As IntPtr
    Public usri4_home_dir_drive As IntPtr
    Public usri4_password_expired As UInteger
End Structure
import ctypes
from ctypes import wintypes

class USER_INFO_4(ctypes.Structure):
    _fields_ = [
        ("usri4_name", ctypes.c_void_p),
        ("usri4_password", ctypes.c_void_p),
        ("usri4_password_age", wintypes.DWORD),
        ("usri4_priv", wintypes.DWORD),
        ("usri4_home_dir", ctypes.c_void_p),
        ("usri4_comment", ctypes.c_void_p),
        ("usri4_flags", wintypes.DWORD),
        ("usri4_script_path", ctypes.c_void_p),
        ("usri4_auth_flags", wintypes.DWORD),
        ("usri4_full_name", ctypes.c_void_p),
        ("usri4_usr_comment", ctypes.c_void_p),
        ("usri4_parms", ctypes.c_void_p),
        ("usri4_workstations", ctypes.c_void_p),
        ("usri4_last_logon", wintypes.DWORD),
        ("usri4_last_logoff", wintypes.DWORD),
        ("usri4_acct_expires", wintypes.DWORD),
        ("usri4_max_storage", wintypes.DWORD),
        ("usri4_units_per_week", wintypes.DWORD),
        ("usri4_logon_hours", ctypes.c_void_p),
        ("usri4_bad_pw_count", wintypes.DWORD),
        ("usri4_num_logons", wintypes.DWORD),
        ("usri4_logon_server", ctypes.c_void_p),
        ("usri4_country_code", wintypes.DWORD),
        ("usri4_code_page", wintypes.DWORD),
        ("usri4_user_sid", ctypes.c_void_p),
        ("usri4_primary_group_id", wintypes.DWORD),
        ("usri4_profile", ctypes.c_void_p),
        ("usri4_home_dir_drive", ctypes.c_void_p),
        ("usri4_password_expired", wintypes.DWORD),
    ]
#[repr(C)]
pub struct USER_INFO_4 {
    pub usri4_name: *mut core::ffi::c_void,
    pub usri4_password: *mut core::ffi::c_void,
    pub usri4_password_age: u32,
    pub usri4_priv: u32,
    pub usri4_home_dir: *mut core::ffi::c_void,
    pub usri4_comment: *mut core::ffi::c_void,
    pub usri4_flags: u32,
    pub usri4_script_path: *mut core::ffi::c_void,
    pub usri4_auth_flags: u32,
    pub usri4_full_name: *mut core::ffi::c_void,
    pub usri4_usr_comment: *mut core::ffi::c_void,
    pub usri4_parms: *mut core::ffi::c_void,
    pub usri4_workstations: *mut core::ffi::c_void,
    pub usri4_last_logon: u32,
    pub usri4_last_logoff: u32,
    pub usri4_acct_expires: u32,
    pub usri4_max_storage: u32,
    pub usri4_units_per_week: u32,
    pub usri4_logon_hours: *mut core::ffi::c_void,
    pub usri4_bad_pw_count: u32,
    pub usri4_num_logons: u32,
    pub usri4_logon_server: *mut core::ffi::c_void,
    pub usri4_country_code: u32,
    pub usri4_code_page: u32,
    pub usri4_user_sid: *mut core::ffi::c_void,
    pub usri4_primary_group_id: u32,
    pub usri4_profile: *mut core::ffi::c_void,
    pub usri4_home_dir_drive: *mut core::ffi::c_void,
    pub usri4_password_expired: u32,
}
import "golang.org/x/sys/windows"

type USER_INFO_4 struct {
	usri4_name uintptr
	usri4_password uintptr
	usri4_password_age uint32
	usri4_priv uint32
	usri4_home_dir uintptr
	usri4_comment uintptr
	usri4_flags uint32
	usri4_script_path uintptr
	usri4_auth_flags uint32
	usri4_full_name uintptr
	usri4_usr_comment uintptr
	usri4_parms uintptr
	usri4_workstations uintptr
	usri4_last_logon uint32
	usri4_last_logoff uint32
	usri4_acct_expires uint32
	usri4_max_storage uint32
	usri4_units_per_week uint32
	usri4_logon_hours uintptr
	usri4_bad_pw_count uint32
	usri4_num_logons uint32
	usri4_logon_server uintptr
	usri4_country_code uint32
	usri4_code_page uint32
	usri4_user_sid uintptr
	usri4_primary_group_id uint32
	usri4_profile uintptr
	usri4_home_dir_drive uintptr
	usri4_password_expired uint32
}
type
  USER_INFO_4 = record
    usri4_name: Pointer;
    usri4_password: Pointer;
    usri4_password_age: DWORD;
    usri4_priv: DWORD;
    usri4_home_dir: Pointer;
    usri4_comment: Pointer;
    usri4_flags: DWORD;
    usri4_script_path: Pointer;
    usri4_auth_flags: DWORD;
    usri4_full_name: Pointer;
    usri4_usr_comment: Pointer;
    usri4_parms: Pointer;
    usri4_workstations: Pointer;
    usri4_last_logon: DWORD;
    usri4_last_logoff: DWORD;
    usri4_acct_expires: DWORD;
    usri4_max_storage: DWORD;
    usri4_units_per_week: DWORD;
    usri4_logon_hours: Pointer;
    usri4_bad_pw_count: DWORD;
    usri4_num_logons: DWORD;
    usri4_logon_server: Pointer;
    usri4_country_code: DWORD;
    usri4_code_page: DWORD;
    usri4_user_sid: Pointer;
    usri4_primary_group_id: DWORD;
    usri4_profile: Pointer;
    usri4_home_dir_drive: Pointer;
    usri4_password_expired: DWORD;
  end;
const USER_INFO_4 = extern struct {
    usri4_name: ?*anyopaque,
    usri4_password: ?*anyopaque,
    usri4_password_age: u32,
    usri4_priv: u32,
    usri4_home_dir: ?*anyopaque,
    usri4_comment: ?*anyopaque,
    usri4_flags: u32,
    usri4_script_path: ?*anyopaque,
    usri4_auth_flags: u32,
    usri4_full_name: ?*anyopaque,
    usri4_usr_comment: ?*anyopaque,
    usri4_parms: ?*anyopaque,
    usri4_workstations: ?*anyopaque,
    usri4_last_logon: u32,
    usri4_last_logoff: u32,
    usri4_acct_expires: u32,
    usri4_max_storage: u32,
    usri4_units_per_week: u32,
    usri4_logon_hours: ?*anyopaque,
    usri4_bad_pw_count: u32,
    usri4_num_logons: u32,
    usri4_logon_server: ?*anyopaque,
    usri4_country_code: u32,
    usri4_code_page: u32,
    usri4_user_sid: ?*anyopaque,
    usri4_primary_group_id: u32,
    usri4_profile: ?*anyopaque,
    usri4_home_dir_drive: ?*anyopaque,
    usri4_password_expired: u32,
};
type
  USER_INFO_4 {.bycopy.} = object
    usri4_name: pointer
    usri4_password: pointer
    usri4_password_age: uint32
    usri4_priv: uint32
    usri4_home_dir: pointer
    usri4_comment: pointer
    usri4_flags: uint32
    usri4_script_path: pointer
    usri4_auth_flags: uint32
    usri4_full_name: pointer
    usri4_usr_comment: pointer
    usri4_parms: pointer
    usri4_workstations: pointer
    usri4_last_logon: uint32
    usri4_last_logoff: uint32
    usri4_acct_expires: uint32
    usri4_max_storage: uint32
    usri4_units_per_week: uint32
    usri4_logon_hours: pointer
    usri4_bad_pw_count: uint32
    usri4_num_logons: uint32
    usri4_logon_server: pointer
    usri4_country_code: uint32
    usri4_code_page: uint32
    usri4_user_sid: pointer
    usri4_primary_group_id: uint32
    usri4_profile: pointer
    usri4_home_dir_drive: pointer
    usri4_password_expired: uint32
struct USER_INFO_4
{
    void* usri4_name;
    void* usri4_password;
    uint usri4_password_age;
    uint usri4_priv;
    void* usri4_home_dir;
    void* usri4_comment;
    uint usri4_flags;
    void* usri4_script_path;
    uint usri4_auth_flags;
    void* usri4_full_name;
    void* usri4_usr_comment;
    void* usri4_parms;
    void* usri4_workstations;
    uint usri4_last_logon;
    uint usri4_last_logoff;
    uint usri4_acct_expires;
    uint usri4_max_storage;
    uint usri4_units_per_week;
    void* usri4_logon_hours;
    uint usri4_bad_pw_count;
    uint usri4_num_logons;
    void* usri4_logon_server;
    uint usri4_country_code;
    uint usri4_code_page;
    void* usri4_user_sid;
    uint usri4_primary_group_id;
    void* usri4_profile;
    void* usri4_home_dir_drive;
    uint usri4_password_expired;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; USER_INFO_4 サイズ: 116 バイト(x86)
dim st, 29    ; 4byte整数×29(構造体サイズ 116 / 4 切り上げ)
; usri4_name : LPWSTR (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; usri4_password : LPWSTR (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; usri4_password_age : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; usri4_priv : USER_PRIV (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; usri4_home_dir : LPWSTR (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; usri4_comment : LPWSTR (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; usri4_flags : USER_ACCOUNT_FLAGS (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; usri4_script_path : LPWSTR (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; usri4_auth_flags : AF_OP (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; usri4_full_name : LPWSTR (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; usri4_usr_comment : LPWSTR (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; usri4_parms : LPWSTR (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; usri4_workstations : LPWSTR (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; usri4_last_logon : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; usri4_last_logoff : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; usri4_acct_expires : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; usri4_max_storage : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; usri4_units_per_week : DWORD (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; usri4_logon_hours : BYTE* (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; usri4_bad_pw_count : DWORD (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; usri4_num_logons : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; usri4_logon_server : LPWSTR (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; usri4_country_code : DWORD (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; usri4_code_page : DWORD (+92, 4byte)  st.23 = 値  /  値 = st.23   (lpoke/lpeek も可)
; usri4_user_sid : PSID (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; usri4_primary_group_id : DWORD (+100, 4byte)  st.25 = 値  /  値 = st.25   (lpoke/lpeek も可)
; usri4_profile : LPWSTR (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; usri4_home_dir_drive : LPWSTR (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; usri4_password_expired : DWORD (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; USER_INFO_4 サイズ: 192 バイト(x64)
dim st, 48    ; 4byte整数×48(構造体サイズ 192 / 4 切り上げ)
; usri4_name : LPWSTR (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; usri4_password : LPWSTR (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; usri4_password_age : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; usri4_priv : USER_PRIV (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; usri4_home_dir : LPWSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; usri4_comment : LPWSTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; usri4_flags : USER_ACCOUNT_FLAGS (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; usri4_script_path : LPWSTR (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; usri4_auth_flags : AF_OP (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; usri4_full_name : LPWSTR (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; usri4_usr_comment : LPWSTR (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; usri4_parms : LPWSTR (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; usri4_workstations : LPWSTR (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; usri4_last_logon : DWORD (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; usri4_last_logoff : DWORD (+100, 4byte)  st.25 = 値  /  値 = st.25   (lpoke/lpeek も可)
; usri4_acct_expires : DWORD (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; usri4_max_storage : DWORD (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; usri4_units_per_week : DWORD (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; usri4_logon_hours : BYTE* (+120, 8byte)  qpoke st,120,値 / qpeek(st,120)  ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; usri4_bad_pw_count : DWORD (+128, 4byte)  st.32 = 値  /  値 = st.32   (lpoke/lpeek も可)
; usri4_num_logons : DWORD (+132, 4byte)  st.33 = 値  /  値 = st.33   (lpoke/lpeek も可)
; usri4_logon_server : LPWSTR (+136, 8byte)  qpoke st,136,値 / qpeek(st,136)  ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; usri4_country_code : DWORD (+144, 4byte)  st.36 = 値  /  値 = st.36   (lpoke/lpeek も可)
; usri4_code_page : DWORD (+148, 4byte)  st.37 = 値  /  値 = st.37   (lpoke/lpeek も可)
; usri4_user_sid : PSID (+152, 8byte)  qpoke st,152,値 / qpeek(st,152)  ※IronHSPのみ。3.7/3.8は lpoke st,152,下位 : lpoke st,156,上位
; usri4_primary_group_id : DWORD (+160, 4byte)  st.40 = 値  /  値 = st.40   (lpoke/lpeek も可)
; usri4_profile : LPWSTR (+168, 8byte)  qpoke st,168,値 / qpeek(st,168)  ※IronHSPのみ。3.7/3.8は lpoke st,168,下位 : lpoke st,172,上位
; usri4_home_dir_drive : LPWSTR (+176, 8byte)  qpoke st,176,値 / qpeek(st,176)  ※IronHSPのみ。3.7/3.8は lpoke st,176,下位 : lpoke st,180,上位
; usri4_password_expired : DWORD (+184, 4byte)  st.46 = 値  /  値 = st.46   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global USER_INFO_4
    #field intptr usri4_name
    #field intptr usri4_password
    #field int usri4_password_age
    #field int usri4_priv
    #field intptr usri4_home_dir
    #field intptr usri4_comment
    #field int usri4_flags
    #field intptr usri4_script_path
    #field int usri4_auth_flags
    #field intptr usri4_full_name
    #field intptr usri4_usr_comment
    #field intptr usri4_parms
    #field intptr usri4_workstations
    #field int usri4_last_logon
    #field int usri4_last_logoff
    #field int usri4_acct_expires
    #field int usri4_max_storage
    #field int usri4_units_per_week
    #field intptr usri4_logon_hours
    #field int usri4_bad_pw_count
    #field int usri4_num_logons
    #field intptr usri4_logon_server
    #field int usri4_country_code
    #field int usri4_code_page
    #field intptr usri4_user_sid
    #field int usri4_primary_group_id
    #field intptr usri4_profile
    #field intptr usri4_home_dir_drive
    #field int usri4_password_expired
#endstruct

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