ホーム › Networking.Clustering › CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT
CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| GetTickCount64 | ULONGLONG | 8 | +0 | +0 | 最後の移動が起きた時点のGetTickCount64値(起動からのミリ秒)である。 |
| GetSystemTime | SYSTEMTIME | 16 | +8 | +8 | 最後の移動が起きた時刻を示すSYSTEMTIME(UTC)である。 |
| NodeId | DWORD | 4 | +24 | +24 | 移動先となったノードの識別子である。 |
各言語での定義
#include <windows.h>
// SYSTEMTIME (x64 16 / x86 16 バイト)
typedef struct SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;
// CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT (x64 32 / x86 32 バイト)
typedef struct CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT {
ULONGLONG GetTickCount64;
SYSTEMTIME GetSystemTime;
DWORD NodeId;
} CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SYSTEMTIME
{
public ushort wYear;
public ushort wMonth;
public ushort wDayOfWeek;
public ushort wDay;
public ushort wHour;
public ushort wMinute;
public ushort wSecond;
public ushort wMilliseconds;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT
{
public ulong GetTickCount64;
public SYSTEMTIME GetSystemTime;
public uint NodeId;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SYSTEMTIME
Public wYear As UShort
Public wMonth As UShort
Public wDayOfWeek As UShort
Public wDay As UShort
Public wHour As UShort
Public wMinute As UShort
Public wSecond As UShort
Public wMilliseconds As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT
Public GetTickCount64 As ULong
Public GetSystemTime As SYSTEMTIME
Public NodeId As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SYSTEMTIME(ctypes.Structure):
_fields_ = [
("wYear", ctypes.c_ushort),
("wMonth", ctypes.c_ushort),
("wDayOfWeek", ctypes.c_ushort),
("wDay", ctypes.c_ushort),
("wHour", ctypes.c_ushort),
("wMinute", ctypes.c_ushort),
("wSecond", ctypes.c_ushort),
("wMilliseconds", ctypes.c_ushort),
]
class CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT(ctypes.Structure):
_fields_ = [
("GetTickCount64", ctypes.c_ulonglong),
("GetSystemTime", SYSTEMTIME),
("NodeId", wintypes.DWORD),
]#[repr(C)]
pub struct SYSTEMTIME {
pub wYear: u16,
pub wMonth: u16,
pub wDayOfWeek: u16,
pub wDay: u16,
pub wHour: u16,
pub wMinute: u16,
pub wSecond: u16,
pub wMilliseconds: u16,
}
#[repr(C)]
pub struct CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT {
pub GetTickCount64: u64,
pub GetSystemTime: SYSTEMTIME,
pub NodeId: u32,
}import "golang.org/x/sys/windows"
type SYSTEMTIME struct {
wYear uint16
wMonth uint16
wDayOfWeek uint16
wDay uint16
wHour uint16
wMinute uint16
wSecond uint16
wMilliseconds uint16
}
type CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT struct {
GetTickCount64 uint64
GetSystemTime SYSTEMTIME
NodeId uint32
}type
SYSTEMTIME = record
wYear: Word;
wMonth: Word;
wDayOfWeek: Word;
wDay: Word;
wHour: Word;
wMinute: Word;
wSecond: Word;
wMilliseconds: Word;
end;
CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT = record
GetTickCount64: UInt64;
GetSystemTime: SYSTEMTIME;
NodeId: DWORD;
end;const SYSTEMTIME = extern struct {
wYear: u16,
wMonth: u16,
wDayOfWeek: u16,
wDay: u16,
wHour: u16,
wMinute: u16,
wSecond: u16,
wMilliseconds: u16,
};
const CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT = extern struct {
GetTickCount64: u64,
GetSystemTime: SYSTEMTIME,
NodeId: u32,
};type
SYSTEMTIME {.bycopy.} = object
wYear: uint16
wMonth: uint16
wDayOfWeek: uint16
wDay: uint16
wHour: uint16
wMinute: uint16
wSecond: uint16
wMilliseconds: uint16
CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT {.bycopy.} = object
GetTickCount64: uint64
GetSystemTime: SYSTEMTIME
NodeId: uint32struct SYSTEMTIME
{
ushort wYear;
ushort wMonth;
ushort wDayOfWeek;
ushort wDay;
ushort wHour;
ushort wMinute;
ushort wSecond;
ushort wMilliseconds;
}
struct CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT
{
ulong GetTickCount64;
SYSTEMTIME GetSystemTime;
uint NodeId;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; GetTickCount64 : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; GetSystemTime : SYSTEMTIME (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; NodeId : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global SYSTEMTIME
#field short wYear
#field short wMonth
#field short wDayOfWeek
#field short wDay
#field short wHour
#field short wMinute
#field short wSecond
#field short wMilliseconds
#endstruct
#defstruct global CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT
#field int64 GetTickCount64
#field SYSTEMTIME GetSystemTime
#field int NodeId
#endstruct
stdim st, CLUSCTL_GROUP_GET_LAST_MOVE_TIME_OUTPUT ; NSTRUCT 変数を確保
st->GetTickCount64 = 100
mes "GetTickCount64=" + st->GetTickCount64