ホーム › NetworkManagement.NetManagement › USER_INFO_1051
USER_INFO_1051
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| usri1051_primary_group_id | DWORD | 4 | +0 | +0 | ユーザーのプライマリグループのRID。 |
各言語での定義
#include <windows.h>
// USER_INFO_1051 (x64 4 / x86 4 バイト)
typedef struct USER_INFO_1051 {
DWORD usri1051_primary_group_id;
} USER_INFO_1051;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct USER_INFO_1051
{
public uint usri1051_primary_group_id;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure USER_INFO_1051
Public usri1051_primary_group_id As UInteger
End Structureimport ctypes
from ctypes import wintypes
class USER_INFO_1051(ctypes.Structure):
_fields_ = [
("usri1051_primary_group_id", wintypes.DWORD),
]#[repr(C)]
pub struct USER_INFO_1051 {
pub usri1051_primary_group_id: u32,
}import "golang.org/x/sys/windows"
type USER_INFO_1051 struct {
usri1051_primary_group_id uint32
}type
USER_INFO_1051 = record
usri1051_primary_group_id: DWORD;
end;const USER_INFO_1051 = extern struct {
usri1051_primary_group_id: u32,
};type
USER_INFO_1051 {.bycopy.} = object
usri1051_primary_group_id: uint32struct USER_INFO_1051
{
uint usri1051_primary_group_id;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; USER_INFO_1051 サイズ: 4 バイト(x64)
dim st, 1 ; 4byte整数×1(構造体サイズ 4 / 4 切り上げ)
; usri1051_primary_group_id : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global USER_INFO_1051
#field int usri1051_primary_group_id
#endstruct
stdim st, USER_INFO_1051 ; NSTRUCT 変数を確保
st->usri1051_primary_group_id = 100
mes "usri1051_primary_group_id=" + st->usri1051_primary_group_id