ホーム › Networking.Clustering › CLUSTER_GROUP_ENUM_ITEM
CLUSTER_GROUP_ENUM_ITEM
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwVersion | DWORD | 4 | +0 | +0 | 本構造体のバージョン番号。 |
| cbId | DWORD | 4 | +4 | +4 | lpszIdが指すID文字列のバイト長。 |
| lpszId | LPWSTR | 8/4 | +8 | +8 | グループの一意識別子文字列。 |
| cbName | DWORD | 4 | +16 | +12 | lpszNameが指す名前文字列のバイト長。 |
| lpszName | LPWSTR | 8/4 | +24 | +16 | グループの表示名文字列。 |
| state | CLUSTER_GROUP_STATE | 4 | +32 | +20 | グループの現在の状態を示すCLUSTER_GROUP_STATE。 |
| cbOwnerNode | DWORD | 4 | +36 | +24 | lpszOwnerNodeが指す所有ノード名のバイト長。 |
| lpszOwnerNode | LPWSTR | 8/4 | +40 | +28 | グループを現在所有するノード名文字列。 |
| dwFlags | DWORD | 4 | +48 | +32 | グループの属性を示すフラグ。 |
| cbProperties | DWORD | 4 | +52 | +36 | pPropertiesが指す共通プロパティのバイト長。 |
| pProperties | void* | 8/4 | +56 | +40 | グループの共通プロパティを格納するバッファへのポインタ。 |
| cbRoProperties | DWORD | 4 | +64 | +44 | pRoPropertiesが指す読み取り専用プロパティのバイト長。 |
| pRoProperties | void* | 8/4 | +72 | +48 | グループの読み取り専用プロパティを格納するバッファへのポインタ。 |
各言語での定義
#include <windows.h>
// CLUSTER_GROUP_ENUM_ITEM (x64 80 / x86 52 バイト)
typedef struct CLUSTER_GROUP_ENUM_ITEM {
DWORD dwVersion;
DWORD cbId;
LPWSTR lpszId;
DWORD cbName;
LPWSTR lpszName;
CLUSTER_GROUP_STATE state;
DWORD cbOwnerNode;
LPWSTR lpszOwnerNode;
DWORD dwFlags;
DWORD cbProperties;
void* pProperties;
DWORD cbRoProperties;
void* pRoProperties;
} CLUSTER_GROUP_ENUM_ITEM;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CLUSTER_GROUP_ENUM_ITEM
{
public uint dwVersion;
public uint cbId;
public IntPtr lpszId;
public uint cbName;
public IntPtr lpszName;
public int state;
public uint cbOwnerNode;
public IntPtr lpszOwnerNode;
public uint dwFlags;
public uint cbProperties;
public IntPtr pProperties;
public uint cbRoProperties;
public IntPtr pRoProperties;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CLUSTER_GROUP_ENUM_ITEM
Public dwVersion As UInteger
Public cbId As UInteger
Public lpszId As IntPtr
Public cbName As UInteger
Public lpszName As IntPtr
Public state As Integer
Public cbOwnerNode As UInteger
Public lpszOwnerNode As IntPtr
Public dwFlags As UInteger
Public cbProperties As UInteger
Public pProperties As IntPtr
Public cbRoProperties As UInteger
Public pRoProperties As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class CLUSTER_GROUP_ENUM_ITEM(ctypes.Structure):
_fields_ = [
("dwVersion", wintypes.DWORD),
("cbId", wintypes.DWORD),
("lpszId", ctypes.c_void_p),
("cbName", wintypes.DWORD),
("lpszName", ctypes.c_void_p),
("state", ctypes.c_int),
("cbOwnerNode", wintypes.DWORD),
("lpszOwnerNode", ctypes.c_void_p),
("dwFlags", wintypes.DWORD),
("cbProperties", wintypes.DWORD),
("pProperties", ctypes.c_void_p),
("cbRoProperties", wintypes.DWORD),
("pRoProperties", ctypes.c_void_p),
]#[repr(C)]
pub struct CLUSTER_GROUP_ENUM_ITEM {
pub dwVersion: u32,
pub cbId: u32,
pub lpszId: *mut core::ffi::c_void,
pub cbName: u32,
pub lpszName: *mut core::ffi::c_void,
pub state: i32,
pub cbOwnerNode: u32,
pub lpszOwnerNode: *mut core::ffi::c_void,
pub dwFlags: u32,
pub cbProperties: u32,
pub pProperties: *mut core::ffi::c_void,
pub cbRoProperties: u32,
pub pRoProperties: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type CLUSTER_GROUP_ENUM_ITEM struct {
dwVersion uint32
cbId uint32
lpszId uintptr
cbName uint32
lpszName uintptr
state int32
cbOwnerNode uint32
lpszOwnerNode uintptr
dwFlags uint32
cbProperties uint32
pProperties uintptr
cbRoProperties uint32
pRoProperties uintptr
}type
CLUSTER_GROUP_ENUM_ITEM = record
dwVersion: DWORD;
cbId: DWORD;
lpszId: Pointer;
cbName: DWORD;
lpszName: Pointer;
state: Integer;
cbOwnerNode: DWORD;
lpszOwnerNode: Pointer;
dwFlags: DWORD;
cbProperties: DWORD;
pProperties: Pointer;
cbRoProperties: DWORD;
pRoProperties: Pointer;
end;const CLUSTER_GROUP_ENUM_ITEM = extern struct {
dwVersion: u32,
cbId: u32,
lpszId: ?*anyopaque,
cbName: u32,
lpszName: ?*anyopaque,
state: i32,
cbOwnerNode: u32,
lpszOwnerNode: ?*anyopaque,
dwFlags: u32,
cbProperties: u32,
pProperties: ?*anyopaque,
cbRoProperties: u32,
pRoProperties: ?*anyopaque,
};type
CLUSTER_GROUP_ENUM_ITEM {.bycopy.} = object
dwVersion: uint32
cbId: uint32
lpszId: pointer
cbName: uint32
lpszName: pointer
state: int32
cbOwnerNode: uint32
lpszOwnerNode: pointer
dwFlags: uint32
cbProperties: uint32
pProperties: pointer
cbRoProperties: uint32
pRoProperties: pointerstruct CLUSTER_GROUP_ENUM_ITEM
{
uint dwVersion;
uint cbId;
void* lpszId;
uint cbName;
void* lpszName;
int state;
uint cbOwnerNode;
void* lpszOwnerNode;
uint dwFlags;
uint cbProperties;
void* pProperties;
uint cbRoProperties;
void* pRoProperties;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CLUSTER_GROUP_ENUM_ITEM サイズ: 52 バイト(x86)
dim st, 13 ; 4byte整数×13(構造体サイズ 52 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; cbId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; lpszId : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cbName : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; lpszName : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; state : CLUSTER_GROUP_STATE (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; cbOwnerNode : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; lpszOwnerNode : LPWSTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwFlags : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; cbProperties : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; pProperties : void* (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; cbRoProperties : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; pRoProperties : void* (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CLUSTER_GROUP_ENUM_ITEM サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; cbId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; lpszId : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; cbName : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; lpszName : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; state : CLUSTER_GROUP_STATE (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; cbOwnerNode : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; lpszOwnerNode : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; dwFlags : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; cbProperties : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; pProperties : void* (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; cbRoProperties : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; pRoProperties : void* (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CLUSTER_GROUP_ENUM_ITEM
#field int dwVersion
#field int cbId
#field intptr lpszId
#field int cbName
#field intptr lpszName
#field int state
#field int cbOwnerNode
#field intptr lpszOwnerNode
#field int dwFlags
#field int cbProperties
#field intptr pProperties
#field int cbRoProperties
#field intptr pRoProperties
#endstruct
stdim st, CLUSTER_GROUP_ENUM_ITEM ; NSTRUCT 変数を確保
st->dwVersion = 100
mes "dwVersion=" + st->dwVersion