ホーム › NetworkManagement.NetManagement › USER_INFO_23
USER_INFO_23
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| usri23_name | LPWSTR | 8/4 | +0 | +0 | ユーザーアカウント名。 |
| usri23_full_name | LPWSTR | 8/4 | +8 | +4 | ユーザーのフルネーム。 |
| usri23_comment | LPWSTR | 8/4 | +16 | +8 | アカウントのコメント。 |
| usri23_flags | USER_ACCOUNT_FLAGS | 4 | +24 | +12 | アカウントの動作と状態を示すフラグ。 |
| usri23_user_sid | PSID | 8/4 | +32 | +16 | ユーザーのセキュリティ識別子(SID)。 |
各言語での定義
#include <windows.h>
// USER_INFO_23 (x64 40 / x86 20 バイト)
typedef struct USER_INFO_23 {
LPWSTR usri23_name;
LPWSTR usri23_full_name;
LPWSTR usri23_comment;
USER_ACCOUNT_FLAGS usri23_flags;
PSID usri23_user_sid;
} USER_INFO_23;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct USER_INFO_23
{
public IntPtr usri23_name;
public IntPtr usri23_full_name;
public IntPtr usri23_comment;
public uint usri23_flags;
public IntPtr usri23_user_sid;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure USER_INFO_23
Public usri23_name As IntPtr
Public usri23_full_name As IntPtr
Public usri23_comment As IntPtr
Public usri23_flags As UInteger
Public usri23_user_sid As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class USER_INFO_23(ctypes.Structure):
_fields_ = [
("usri23_name", ctypes.c_void_p),
("usri23_full_name", ctypes.c_void_p),
("usri23_comment", ctypes.c_void_p),
("usri23_flags", wintypes.DWORD),
("usri23_user_sid", ctypes.c_void_p),
]#[repr(C)]
pub struct USER_INFO_23 {
pub usri23_name: *mut core::ffi::c_void,
pub usri23_full_name: *mut core::ffi::c_void,
pub usri23_comment: *mut core::ffi::c_void,
pub usri23_flags: u32,
pub usri23_user_sid: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type USER_INFO_23 struct {
usri23_name uintptr
usri23_full_name uintptr
usri23_comment uintptr
usri23_flags uint32
usri23_user_sid uintptr
}type
USER_INFO_23 = record
usri23_name: Pointer;
usri23_full_name: Pointer;
usri23_comment: Pointer;
usri23_flags: DWORD;
usri23_user_sid: Pointer;
end;const USER_INFO_23 = extern struct {
usri23_name: ?*anyopaque,
usri23_full_name: ?*anyopaque,
usri23_comment: ?*anyopaque,
usri23_flags: u32,
usri23_user_sid: ?*anyopaque,
};type
USER_INFO_23 {.bycopy.} = object
usri23_name: pointer
usri23_full_name: pointer
usri23_comment: pointer
usri23_flags: uint32
usri23_user_sid: pointerstruct USER_INFO_23
{
void* usri23_name;
void* usri23_full_name;
void* usri23_comment;
uint usri23_flags;
void* usri23_user_sid;
}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_23 サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; usri23_name : LPWSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; usri23_full_name : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; usri23_comment : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; usri23_flags : USER_ACCOUNT_FLAGS (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; usri23_user_sid : PSID (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; USER_INFO_23 サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; usri23_name : LPWSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; usri23_full_name : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; usri23_comment : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; usri23_flags : USER_ACCOUNT_FLAGS (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; usri23_user_sid : PSID (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global USER_INFO_23
#field intptr usri23_name
#field intptr usri23_full_name
#field intptr usri23_comment
#field int usri23_flags
#field intptr usri23_user_sid
#endstruct
stdim st, USER_INFO_23 ; NSTRUCT 変数を確保
st->usri23_flags = 100
mes "usri23_flags=" + st->usri23_flags