Win32 API 日本語リファレンス
ホームStorage.FileSystem › STAT_SERVER_0

STAT_SERVER_0

構造体
サイズx64: 68 バイト / x86: 68 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
sts0_startDWORD4+0+0統計収集を開始した時刻(1970年起点の秒数)。
sts0_fopensDWORD4+4+4サーバーで開かれたファイル数。
sts0_devopensDWORD4+8+8サーバーで開かれた通信デバイス数。
sts0_jobsqueuedDWORD4+12+12スプーラーにキューされた印刷ジョブ数。
sts0_sopensDWORD4+16+16開始されたセッション数。
sts0_stimedoutDWORD4+20+20自動切断によりタイムアウトしたセッション数。
sts0_serroroutDWORD4+24+24エラーにより終了したセッション数。
sts0_pwerrorsDWORD4+28+28発生したパスワード違反の数。
sts0_permerrorsDWORD4+32+32発生したアクセス権限違反の数。
sts0_syserrorsDWORD4+36+36発生したシステムエラーの数。
sts0_bytessent_lowDWORD4+40+40送信総バイト数の下位32ビット。
sts0_bytessent_highDWORD4+44+44送信総バイト数の上位32ビット。
sts0_bytesrcvd_lowDWORD4+48+48受信総バイト数の下位32ビット。
sts0_bytesrcvd_highDWORD4+52+52受信総バイト数の上位32ビット。
sts0_avresponseDWORD4+56+56サーバーの平均応答時間(ミリ秒)。
sts0_reqbufneedDWORD4+60+60要求バッファが不足した回数。
sts0_bigbufneedDWORD4+64+64大容量バッファが不足した回数。

各言語での定義

#include <windows.h>

// STAT_SERVER_0  (x64 68 / x86 68 バイト)
typedef struct STAT_SERVER_0 {
    DWORD sts0_start;
    DWORD sts0_fopens;
    DWORD sts0_devopens;
    DWORD sts0_jobsqueued;
    DWORD sts0_sopens;
    DWORD sts0_stimedout;
    DWORD sts0_serrorout;
    DWORD sts0_pwerrors;
    DWORD sts0_permerrors;
    DWORD sts0_syserrors;
    DWORD sts0_bytessent_low;
    DWORD sts0_bytessent_high;
    DWORD sts0_bytesrcvd_low;
    DWORD sts0_bytesrcvd_high;
    DWORD sts0_avresponse;
    DWORD sts0_reqbufneed;
    DWORD sts0_bigbufneed;
} STAT_SERVER_0;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct STAT_SERVER_0
{
    public uint sts0_start;
    public uint sts0_fopens;
    public uint sts0_devopens;
    public uint sts0_jobsqueued;
    public uint sts0_sopens;
    public uint sts0_stimedout;
    public uint sts0_serrorout;
    public uint sts0_pwerrors;
    public uint sts0_permerrors;
    public uint sts0_syserrors;
    public uint sts0_bytessent_low;
    public uint sts0_bytessent_high;
    public uint sts0_bytesrcvd_low;
    public uint sts0_bytesrcvd_high;
    public uint sts0_avresponse;
    public uint sts0_reqbufneed;
    public uint sts0_bigbufneed;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure STAT_SERVER_0
    Public sts0_start As UInteger
    Public sts0_fopens As UInteger
    Public sts0_devopens As UInteger
    Public sts0_jobsqueued As UInteger
    Public sts0_sopens As UInteger
    Public sts0_stimedout As UInteger
    Public sts0_serrorout As UInteger
    Public sts0_pwerrors As UInteger
    Public sts0_permerrors As UInteger
    Public sts0_syserrors As UInteger
    Public sts0_bytessent_low As UInteger
    Public sts0_bytessent_high As UInteger
    Public sts0_bytesrcvd_low As UInteger
    Public sts0_bytesrcvd_high As UInteger
    Public sts0_avresponse As UInteger
    Public sts0_reqbufneed As UInteger
    Public sts0_bigbufneed As UInteger
End Structure
import ctypes
from ctypes import wintypes

class STAT_SERVER_0(ctypes.Structure):
    _fields_ = [
        ("sts0_start", wintypes.DWORD),
        ("sts0_fopens", wintypes.DWORD),
        ("sts0_devopens", wintypes.DWORD),
        ("sts0_jobsqueued", wintypes.DWORD),
        ("sts0_sopens", wintypes.DWORD),
        ("sts0_stimedout", wintypes.DWORD),
        ("sts0_serrorout", wintypes.DWORD),
        ("sts0_pwerrors", wintypes.DWORD),
        ("sts0_permerrors", wintypes.DWORD),
        ("sts0_syserrors", wintypes.DWORD),
        ("sts0_bytessent_low", wintypes.DWORD),
        ("sts0_bytessent_high", wintypes.DWORD),
        ("sts0_bytesrcvd_low", wintypes.DWORD),
        ("sts0_bytesrcvd_high", wintypes.DWORD),
        ("sts0_avresponse", wintypes.DWORD),
        ("sts0_reqbufneed", wintypes.DWORD),
        ("sts0_bigbufneed", wintypes.DWORD),
    ]
#[repr(C)]
pub struct STAT_SERVER_0 {
    pub sts0_start: u32,
    pub sts0_fopens: u32,
    pub sts0_devopens: u32,
    pub sts0_jobsqueued: u32,
    pub sts0_sopens: u32,
    pub sts0_stimedout: u32,
    pub sts0_serrorout: u32,
    pub sts0_pwerrors: u32,
    pub sts0_permerrors: u32,
    pub sts0_syserrors: u32,
    pub sts0_bytessent_low: u32,
    pub sts0_bytessent_high: u32,
    pub sts0_bytesrcvd_low: u32,
    pub sts0_bytesrcvd_high: u32,
    pub sts0_avresponse: u32,
    pub sts0_reqbufneed: u32,
    pub sts0_bigbufneed: u32,
}
import "golang.org/x/sys/windows"

type STAT_SERVER_0 struct {
	sts0_start uint32
	sts0_fopens uint32
	sts0_devopens uint32
	sts0_jobsqueued uint32
	sts0_sopens uint32
	sts0_stimedout uint32
	sts0_serrorout uint32
	sts0_pwerrors uint32
	sts0_permerrors uint32
	sts0_syserrors uint32
	sts0_bytessent_low uint32
	sts0_bytessent_high uint32
	sts0_bytesrcvd_low uint32
	sts0_bytesrcvd_high uint32
	sts0_avresponse uint32
	sts0_reqbufneed uint32
	sts0_bigbufneed uint32
}
type
  STAT_SERVER_0 = record
    sts0_start: DWORD;
    sts0_fopens: DWORD;
    sts0_devopens: DWORD;
    sts0_jobsqueued: DWORD;
    sts0_sopens: DWORD;
    sts0_stimedout: DWORD;
    sts0_serrorout: DWORD;
    sts0_pwerrors: DWORD;
    sts0_permerrors: DWORD;
    sts0_syserrors: DWORD;
    sts0_bytessent_low: DWORD;
    sts0_bytessent_high: DWORD;
    sts0_bytesrcvd_low: DWORD;
    sts0_bytesrcvd_high: DWORD;
    sts0_avresponse: DWORD;
    sts0_reqbufneed: DWORD;
    sts0_bigbufneed: DWORD;
  end;
const STAT_SERVER_0 = extern struct {
    sts0_start: u32,
    sts0_fopens: u32,
    sts0_devopens: u32,
    sts0_jobsqueued: u32,
    sts0_sopens: u32,
    sts0_stimedout: u32,
    sts0_serrorout: u32,
    sts0_pwerrors: u32,
    sts0_permerrors: u32,
    sts0_syserrors: u32,
    sts0_bytessent_low: u32,
    sts0_bytessent_high: u32,
    sts0_bytesrcvd_low: u32,
    sts0_bytesrcvd_high: u32,
    sts0_avresponse: u32,
    sts0_reqbufneed: u32,
    sts0_bigbufneed: u32,
};
type
  STAT_SERVER_0 {.bycopy.} = object
    sts0_start: uint32
    sts0_fopens: uint32
    sts0_devopens: uint32
    sts0_jobsqueued: uint32
    sts0_sopens: uint32
    sts0_stimedout: uint32
    sts0_serrorout: uint32
    sts0_pwerrors: uint32
    sts0_permerrors: uint32
    sts0_syserrors: uint32
    sts0_bytessent_low: uint32
    sts0_bytessent_high: uint32
    sts0_bytesrcvd_low: uint32
    sts0_bytesrcvd_high: uint32
    sts0_avresponse: uint32
    sts0_reqbufneed: uint32
    sts0_bigbufneed: uint32
struct STAT_SERVER_0
{
    uint sts0_start;
    uint sts0_fopens;
    uint sts0_devopens;
    uint sts0_jobsqueued;
    uint sts0_sopens;
    uint sts0_stimedout;
    uint sts0_serrorout;
    uint sts0_pwerrors;
    uint sts0_permerrors;
    uint sts0_syserrors;
    uint sts0_bytessent_low;
    uint sts0_bytessent_high;
    uint sts0_bytesrcvd_low;
    uint sts0_bytesrcvd_high;
    uint sts0_avresponse;
    uint sts0_reqbufneed;
    uint sts0_bigbufneed;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; STAT_SERVER_0 サイズ: 68 バイト(x64)
dim st, 17    ; 4byte整数×17(構造体サイズ 68 / 4 切り上げ)
; sts0_start : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; sts0_fopens : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; sts0_devopens : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; sts0_jobsqueued : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; sts0_sopens : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; sts0_stimedout : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; sts0_serrorout : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; sts0_pwerrors : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; sts0_permerrors : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; sts0_syserrors : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; sts0_bytessent_low : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; sts0_bytessent_high : DWORD (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; sts0_bytesrcvd_low : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; sts0_bytesrcvd_high : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; sts0_avresponse : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; sts0_reqbufneed : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; sts0_bigbufneed : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global STAT_SERVER_0
    #field int sts0_start
    #field int sts0_fopens
    #field int sts0_devopens
    #field int sts0_jobsqueued
    #field int sts0_sopens
    #field int sts0_stimedout
    #field int sts0_serrorout
    #field int sts0_pwerrors
    #field int sts0_permerrors
    #field int sts0_syserrors
    #field int sts0_bytessent_low
    #field int sts0_bytessent_high
    #field int sts0_bytesrcvd_low
    #field int sts0_bytesrcvd_high
    #field int sts0_avresponse
    #field int sts0_reqbufneed
    #field int sts0_bigbufneed
#endstruct

stdim st, STAT_SERVER_0        ; NSTRUCT 変数を確保
st->sts0_start = 100
mes "sts0_start=" + st->sts0_start