ホーム › Storage.FileSystem › VOLUME_ALLOCATE_BC_STREAM_OUTPUT
VOLUME_ALLOCATE_BC_STREAM_OUTPUT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| RequestSize | ULONGLONG | 8 | +0 | +0 | 割り当てられた要求サイズ。バイト単位。 |
| NumOutStandingRequests | DWORD | 4 | +8 | +8 | 同時に処理中にできる要求数。 |
各言語での定義
#include <windows.h>
// VOLUME_ALLOCATE_BC_STREAM_OUTPUT (x64 16 / x86 16 バイト)
typedef struct VOLUME_ALLOCATE_BC_STREAM_OUTPUT {
ULONGLONG RequestSize;
DWORD NumOutStandingRequests;
} VOLUME_ALLOCATE_BC_STREAM_OUTPUT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VOLUME_ALLOCATE_BC_STREAM_OUTPUT
{
public ulong RequestSize;
public uint NumOutStandingRequests;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VOLUME_ALLOCATE_BC_STREAM_OUTPUT
Public RequestSize As ULong
Public NumOutStandingRequests As UInteger
End Structureimport ctypes
from ctypes import wintypes
class VOLUME_ALLOCATE_BC_STREAM_OUTPUT(ctypes.Structure):
_fields_ = [
("RequestSize", ctypes.c_ulonglong),
("NumOutStandingRequests", wintypes.DWORD),
]#[repr(C)]
pub struct VOLUME_ALLOCATE_BC_STREAM_OUTPUT {
pub RequestSize: u64,
pub NumOutStandingRequests: u32,
}import "golang.org/x/sys/windows"
type VOLUME_ALLOCATE_BC_STREAM_OUTPUT struct {
RequestSize uint64
NumOutStandingRequests uint32
}type
VOLUME_ALLOCATE_BC_STREAM_OUTPUT = record
RequestSize: UInt64;
NumOutStandingRequests: DWORD;
end;const VOLUME_ALLOCATE_BC_STREAM_OUTPUT = extern struct {
RequestSize: u64,
NumOutStandingRequests: u32,
};type
VOLUME_ALLOCATE_BC_STREAM_OUTPUT {.bycopy.} = object
RequestSize: uint64
NumOutStandingRequests: uint32struct VOLUME_ALLOCATE_BC_STREAM_OUTPUT
{
ulong RequestSize;
uint NumOutStandingRequests;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VOLUME_ALLOCATE_BC_STREAM_OUTPUT サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; RequestSize : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; NumOutStandingRequests : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global VOLUME_ALLOCATE_BC_STREAM_OUTPUT
#field int64 RequestSize
#field int NumOutStandingRequests
#endstruct
stdim st, VOLUME_ALLOCATE_BC_STREAM_OUTPUT ; NSTRUCT 変数を確保
st->RequestSize = 100
mes "RequestSize=" + st->RequestSize