ホーム › 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 | クラスターで実行される OS のメジャーバージョンです。このメンバーには CLUSAPI_VERSION_WINDOWSBLUE より大きい値を設定しなければなりません。 |
| lpszClusterName | LPWSTR | 8/4 | +8 | +4 | ドメイン上でクラスターを表すクラスター名です。 |
| dwFlags | DWORD | 4 | +16 | +8 | 将来の使用のために予約済みです。この値は "0" でなければなりません。 |
| 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 | 管理ポイントの種類です。 |
| managementPointResType | CLUSTER_MGMT_POINT_RESTYPE | 4 | +52 | +28 | 管理ポイントリソースの種別を示すCLUSTER_MGMT_POINT_RESTYPE。 |
| bUpgradeVCOs | BOOLEAN | 1 | +56 | +32 | TRUEなら仮想コンピュータオブジェクト(VCO)をアップグレードすることを示す論理値。 |
公式ドキュメント
クラスターをドメインに追加するために CreateClusterNameAccount 関数が使用する、クラスター名リソースとドメイン資格情報を記述します。PCREATE_CLUSTER_NAME_ACCOUNT はこの構造体へのポインターを定義します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#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