ホーム › System.SystemServices › SERVERSILO_BASIC_INFORMATION
SERVERSILO_BASIC_INFORMATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ServiceSessionId | DWORD | 4 | +0 | +0 | サーバーサイロに割り当てられたサービスセッションID。 |
| State | SERVERSILO_STATE | 4 | +4 | +4 | サーバーサイロの現在の状態(初期化/実行/終了等)。 |
| ExitStatus | DWORD | 4 | +8 | +8 | サイロ終了時の終了ステータスコード。 |
| Reserved | BOOLEAN | 1 | +12 | +12 | 予約フィールド(真偽値)。 |
| ApiSetSchema | void* | 8/4 | +16 | +16 | サイロ用APIセットスキーマへのポインタ。 |
| HostApiSetSchema | void* | 8/4 | +24 | +20 | ホスト側APIセットスキーマへのポインタ。 |
| ContainerBuildNumber | DWORD | 4 | +32 | +24 | コンテナーのOSビルド番号。 |
| HostBuildNumber | DWORD | 4 | +36 | +28 | ホストのOSビルド番号。 |
各言語での定義
#include <windows.h>
// SERVERSILO_BASIC_INFORMATION (x64 40 / x86 32 バイト)
typedef struct SERVERSILO_BASIC_INFORMATION {
DWORD ServiceSessionId;
SERVERSILO_STATE State;
DWORD ExitStatus;
BOOLEAN Reserved;
void* ApiSetSchema;
void* HostApiSetSchema;
DWORD ContainerBuildNumber;
DWORD HostBuildNumber;
} SERVERSILO_BASIC_INFORMATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SERVERSILO_BASIC_INFORMATION
{
public uint ServiceSessionId;
public int State;
public uint ExitStatus;
[MarshalAs(UnmanagedType.U1)] public bool Reserved;
public IntPtr ApiSetSchema;
public IntPtr HostApiSetSchema;
public uint ContainerBuildNumber;
public uint HostBuildNumber;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SERVERSILO_BASIC_INFORMATION
Public ServiceSessionId As UInteger
Public State As Integer
Public ExitStatus As UInteger
<MarshalAs(UnmanagedType.U1)> Public Reserved As Boolean
Public ApiSetSchema As IntPtr
Public HostApiSetSchema As IntPtr
Public ContainerBuildNumber As UInteger
Public HostBuildNumber As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SERVERSILO_BASIC_INFORMATION(ctypes.Structure):
_fields_ = [
("ServiceSessionId", wintypes.DWORD),
("State", ctypes.c_int),
("ExitStatus", wintypes.DWORD),
("Reserved", ctypes.c_byte),
("ApiSetSchema", ctypes.c_void_p),
("HostApiSetSchema", ctypes.c_void_p),
("ContainerBuildNumber", wintypes.DWORD),
("HostBuildNumber", wintypes.DWORD),
]#[repr(C)]
pub struct SERVERSILO_BASIC_INFORMATION {
pub ServiceSessionId: u32,
pub State: i32,
pub ExitStatus: u32,
pub Reserved: u8,
pub ApiSetSchema: *mut core::ffi::c_void,
pub HostApiSetSchema: *mut core::ffi::c_void,
pub ContainerBuildNumber: u32,
pub HostBuildNumber: u32,
}import "golang.org/x/sys/windows"
type SERVERSILO_BASIC_INFORMATION struct {
ServiceSessionId uint32
State int32
ExitStatus uint32
Reserved byte
ApiSetSchema uintptr
HostApiSetSchema uintptr
ContainerBuildNumber uint32
HostBuildNumber uint32
}type
SERVERSILO_BASIC_INFORMATION = record
ServiceSessionId: DWORD;
State: Integer;
ExitStatus: DWORD;
Reserved: ByteBool;
ApiSetSchema: Pointer;
HostApiSetSchema: Pointer;
ContainerBuildNumber: DWORD;
HostBuildNumber: DWORD;
end;const SERVERSILO_BASIC_INFORMATION = extern struct {
ServiceSessionId: u32,
State: i32,
ExitStatus: u32,
Reserved: u8,
ApiSetSchema: ?*anyopaque,
HostApiSetSchema: ?*anyopaque,
ContainerBuildNumber: u32,
HostBuildNumber: u32,
};type
SERVERSILO_BASIC_INFORMATION {.bycopy.} = object
ServiceSessionId: uint32
State: int32
ExitStatus: uint32
Reserved: uint8
ApiSetSchema: pointer
HostApiSetSchema: pointer
ContainerBuildNumber: uint32
HostBuildNumber: uint32struct SERVERSILO_BASIC_INFORMATION
{
uint ServiceSessionId;
int State;
uint ExitStatus;
ubyte Reserved;
void* ApiSetSchema;
void* HostApiSetSchema;
uint ContainerBuildNumber;
uint HostBuildNumber;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SERVERSILO_BASIC_INFORMATION サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; ServiceSessionId : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; State : SERVERSILO_STATE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ExitStatus : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Reserved : BOOLEAN (+12, 1byte) poke st,12,値 / 値 = peek(st,12)
; ApiSetSchema : void* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; HostApiSetSchema : void* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ContainerBuildNumber : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; HostBuildNumber : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SERVERSILO_BASIC_INFORMATION サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; ServiceSessionId : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; State : SERVERSILO_STATE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ExitStatus : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Reserved : BOOLEAN (+12, 1byte) poke st,12,値 / 値 = peek(st,12)
; ApiSetSchema : void* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; HostApiSetSchema : void* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ContainerBuildNumber : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; HostBuildNumber : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SERVERSILO_BASIC_INFORMATION
#field int ServiceSessionId
#field int State
#field int ExitStatus
#field bool1 Reserved
#field intptr ApiSetSchema
#field intptr HostApiSetSchema
#field int ContainerBuildNumber
#field int HostBuildNumber
#endstruct
stdim st, SERVERSILO_BASIC_INFORMATION ; NSTRUCT 変数を確保
st->ServiceSessionId = 100
mes "ServiceSessionId=" + st->ServiceSessionId