Win32 API 日本語リファレンス
ホームSystem.Ioctl › STORAGE_GET_BC_PROPERTIES_OUTPUT

STORAGE_GET_BC_PROPERTIES_OUTPUT

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

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

フィールド

フィールドサイズx64x86説明
MaximumRequestsPerPeriodDWORD4+0+01期間あたりに許可される最大リクエスト数。
MinimumPeriodDWORD4+4+4最小の期間長をミリ秒単位で示す。
MaximumRequestSizeULONGLONG8+8+81リクエストの最大サイズをバイト単位で示す。
EstimatedTimePerRequestDWORD4+16+161リクエストあたりの推定処理時間をミリ秒単位で示す。
NumOutStandingRequestsDWORD4+20+20未処理リクエストの許容数。
RequestSizeULONGLONG8+24+24推奨されるリクエストサイズをバイト単位で示す。

各言語での定義

#include <windows.h>

// STORAGE_GET_BC_PROPERTIES_OUTPUT  (x64 32 / x86 32 バイト)
typedef struct STORAGE_GET_BC_PROPERTIES_OUTPUT {
    DWORD MaximumRequestsPerPeriod;
    DWORD MinimumPeriod;
    ULONGLONG MaximumRequestSize;
    DWORD EstimatedTimePerRequest;
    DWORD NumOutStandingRequests;
    ULONGLONG RequestSize;
} STORAGE_GET_BC_PROPERTIES_OUTPUT;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct STORAGE_GET_BC_PROPERTIES_OUTPUT
{
    public uint MaximumRequestsPerPeriod;
    public uint MinimumPeriod;
    public ulong MaximumRequestSize;
    public uint EstimatedTimePerRequest;
    public uint NumOutStandingRequests;
    public ulong RequestSize;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure STORAGE_GET_BC_PROPERTIES_OUTPUT
    Public MaximumRequestsPerPeriod As UInteger
    Public MinimumPeriod As UInteger
    Public MaximumRequestSize As ULong
    Public EstimatedTimePerRequest As UInteger
    Public NumOutStandingRequests As UInteger
    Public RequestSize As ULong
End Structure
import ctypes
from ctypes import wintypes

class STORAGE_GET_BC_PROPERTIES_OUTPUT(ctypes.Structure):
    _fields_ = [
        ("MaximumRequestsPerPeriod", wintypes.DWORD),
        ("MinimumPeriod", wintypes.DWORD),
        ("MaximumRequestSize", ctypes.c_ulonglong),
        ("EstimatedTimePerRequest", wintypes.DWORD),
        ("NumOutStandingRequests", wintypes.DWORD),
        ("RequestSize", ctypes.c_ulonglong),
    ]
#[repr(C)]
pub struct STORAGE_GET_BC_PROPERTIES_OUTPUT {
    pub MaximumRequestsPerPeriod: u32,
    pub MinimumPeriod: u32,
    pub MaximumRequestSize: u64,
    pub EstimatedTimePerRequest: u32,
    pub NumOutStandingRequests: u32,
    pub RequestSize: u64,
}
import "golang.org/x/sys/windows"

type STORAGE_GET_BC_PROPERTIES_OUTPUT struct {
	MaximumRequestsPerPeriod uint32
	MinimumPeriod uint32
	MaximumRequestSize uint64
	EstimatedTimePerRequest uint32
	NumOutStandingRequests uint32
	RequestSize uint64
}
type
  STORAGE_GET_BC_PROPERTIES_OUTPUT = record
    MaximumRequestsPerPeriod: DWORD;
    MinimumPeriod: DWORD;
    MaximumRequestSize: UInt64;
    EstimatedTimePerRequest: DWORD;
    NumOutStandingRequests: DWORD;
    RequestSize: UInt64;
  end;
const STORAGE_GET_BC_PROPERTIES_OUTPUT = extern struct {
    MaximumRequestsPerPeriod: u32,
    MinimumPeriod: u32,
    MaximumRequestSize: u64,
    EstimatedTimePerRequest: u32,
    NumOutStandingRequests: u32,
    RequestSize: u64,
};
type
  STORAGE_GET_BC_PROPERTIES_OUTPUT {.bycopy.} = object
    MaximumRequestsPerPeriod: uint32
    MinimumPeriod: uint32
    MaximumRequestSize: uint64
    EstimatedTimePerRequest: uint32
    NumOutStandingRequests: uint32
    RequestSize: uint64
struct STORAGE_GET_BC_PROPERTIES_OUTPUT
{
    uint MaximumRequestsPerPeriod;
    uint MinimumPeriod;
    ulong MaximumRequestSize;
    uint EstimatedTimePerRequest;
    uint NumOutStandingRequests;
    ulong RequestSize;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; STORAGE_GET_BC_PROPERTIES_OUTPUT サイズ: 32 バイト(x64)
dim st, 8    ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; MaximumRequestsPerPeriod : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; MinimumPeriod : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; MaximumRequestSize : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; EstimatedTimePerRequest : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; NumOutStandingRequests : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; RequestSize : ULONGLONG (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global STORAGE_GET_BC_PROPERTIES_OUTPUT
    #field int MaximumRequestsPerPeriod
    #field int MinimumPeriod
    #field int64 MaximumRequestSize
    #field int EstimatedTimePerRequest
    #field int NumOutStandingRequests
    #field int64 RequestSize
#endstruct

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