ホーム › Networking.Clustering › CREATE_CLUSTER_NAME_ACCOUNT
CREATE_CLUSTER_NAME_ACCOUNT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwVersion | DWORD | 4 | +0 | +0 | 本構造体のバージョン番号。 |
| lpszClusterName | LPWSTR | 8/4 | +8 | +4 | 作成するクラスタ名アカウントのクラスタ名文字列。 |
| dwFlags | DWORD | 4 | +16 | +8 | アカウント作成の動作を制御するフラグ。 |
| pszUserName | LPWSTR | 8/4 | +24 | +12 | 操作に使用するユーザ名文字列。 |
| pszPassword | LPWSTR | 8/4 | +32 | +16 | 操作に使用するパスワード文字列。 |
| pszDomain | LPWSTR | 8/4 | +40 | +20 | 操作に使用するドメイン名文字列。 |
| managementPointType | CLUSTER_MGMT_POINT_TYPE | 4 | +48 | +24 | 管理ポイントの種別を示すCLUSTER_MGMT_POINT_TYPE。 |
| managementPointResType | CLUSTER_MGMT_POINT_RESTYPE | 4 | +52 | +28 | 管理ポイントリソースの種別を示すCLUSTER_MGMT_POINT_RESTYPE。 |
| bUpgradeVCOs | BOOLEAN | 1 | +56 | +32 | TRUEなら仮想コンピュータオブジェクト(VCO)をアップグレードすることを示す論理値。 |
各言語での定義
#include <windows.h>
// CREATE_CLUSTER_NAME_ACCOUNT (x64 64 / x86 36 バイト)
typedef struct CREATE_CLUSTER_NAME_ACCOUNT {
DWORD dwVersion;
LPWSTR lpszClusterName;
DWORD dwFlags;
LPWSTR pszUserName;
LPWSTR pszPassword;
LPWSTR pszDomain;
CLUSTER_MGMT_POINT_TYPE managementPointType;
CLUSTER_MGMT_POINT_RESTYPE managementPointResType;
BOOLEAN bUpgradeVCOs;
} CREATE_CLUSTER_NAME_ACCOUNT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CREATE_CLUSTER_NAME_ACCOUNT
{
public uint dwVersion;
public IntPtr lpszClusterName;
public uint dwFlags;
public IntPtr pszUserName;
public IntPtr pszPassword;
public IntPtr pszDomain;
public int managementPointType;
public int managementPointResType;
[MarshalAs(UnmanagedType.U1)] public bool bUpgradeVCOs;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CREATE_CLUSTER_NAME_ACCOUNT
Public dwVersion As UInteger
Public lpszClusterName As IntPtr
Public dwFlags As UInteger
Public pszUserName As IntPtr
Public pszPassword As IntPtr
Public pszDomain As IntPtr
Public managementPointType As Integer
Public managementPointResType As Integer
<MarshalAs(UnmanagedType.U1)> Public bUpgradeVCOs As Boolean
End Structureimport ctypes
from ctypes import wintypes
class CREATE_CLUSTER_NAME_ACCOUNT(ctypes.Structure):
_fields_ = [
("dwVersion", wintypes.DWORD),
("lpszClusterName", ctypes.c_void_p),
("dwFlags", wintypes.DWORD),
("pszUserName", ctypes.c_void_p),
("pszPassword", ctypes.c_void_p),
("pszDomain", ctypes.c_void_p),
("managementPointType", ctypes.c_int),
("managementPointResType", ctypes.c_int),
("bUpgradeVCOs", ctypes.c_byte),
]#[repr(C)]
pub struct CREATE_CLUSTER_NAME_ACCOUNT {
pub dwVersion: u32,
pub lpszClusterName: *mut core::ffi::c_void,
pub dwFlags: u32,
pub pszUserName: *mut core::ffi::c_void,
pub pszPassword: *mut core::ffi::c_void,
pub pszDomain: *mut core::ffi::c_void,
pub managementPointType: i32,
pub managementPointResType: i32,
pub bUpgradeVCOs: u8,
}import "golang.org/x/sys/windows"
type CREATE_CLUSTER_NAME_ACCOUNT struct {
dwVersion uint32
lpszClusterName uintptr
dwFlags uint32
pszUserName uintptr
pszPassword uintptr
pszDomain uintptr
managementPointType int32
managementPointResType int32
bUpgradeVCOs byte
}type
CREATE_CLUSTER_NAME_ACCOUNT = record
dwVersion: DWORD;
lpszClusterName: Pointer;
dwFlags: DWORD;
pszUserName: Pointer;
pszPassword: Pointer;
pszDomain: Pointer;
managementPointType: Integer;
managementPointResType: Integer;
bUpgradeVCOs: ByteBool;
end;const CREATE_CLUSTER_NAME_ACCOUNT = extern struct {
dwVersion: u32,
lpszClusterName: ?*anyopaque,
dwFlags: u32,
pszUserName: ?*anyopaque,
pszPassword: ?*anyopaque,
pszDomain: ?*anyopaque,
managementPointType: i32,
managementPointResType: i32,
bUpgradeVCOs: u8,
};type
CREATE_CLUSTER_NAME_ACCOUNT {.bycopy.} = object
dwVersion: uint32
lpszClusterName: pointer
dwFlags: uint32
pszUserName: pointer
pszPassword: pointer
pszDomain: pointer
managementPointType: int32
managementPointResType: int32
bUpgradeVCOs: uint8struct CREATE_CLUSTER_NAME_ACCOUNT
{
uint dwVersion;
void* lpszClusterName;
uint dwFlags;
void* pszUserName;
void* pszPassword;
void* pszDomain;
int managementPointType;
int managementPointResType;
ubyte bUpgradeVCOs;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CREATE_CLUSTER_NAME_ACCOUNT サイズ: 36 バイト(x86)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lpszClusterName : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwFlags : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pszUserName : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pszPassword : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pszDomain : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; managementPointType : CLUSTER_MGMT_POINT_TYPE (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; managementPointResType : CLUSTER_MGMT_POINT_RESTYPE (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; bUpgradeVCOs : BOOLEAN (+32, 1byte) poke st,32,値 / 値 = peek(st,32)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CREATE_CLUSTER_NAME_ACCOUNT サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lpszClusterName : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; dwFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pszUserName : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pszPassword : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pszDomain : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; managementPointType : CLUSTER_MGMT_POINT_TYPE (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; managementPointResType : CLUSTER_MGMT_POINT_RESTYPE (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; bUpgradeVCOs : BOOLEAN (+56, 1byte) poke st,56,値 / 値 = peek(st,56)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CREATE_CLUSTER_NAME_ACCOUNT
#field int dwVersion
#field intptr lpszClusterName
#field int dwFlags
#field intptr pszUserName
#field intptr pszPassword
#field intptr pszDomain
#field int managementPointType
#field int managementPointResType
#field bool1 bUpgradeVCOs
#endstruct
stdim st, CREATE_CLUSTER_NAME_ACCOUNT ; NSTRUCT 変数を確保
st->dwVersion = 100
mes "dwVersion=" + st->dwVersion