Win32 API 日本語リファレンス
ホームNetworking.HttpServer › HTTP_REQUEST_TIMING_INFO

HTTP_REQUEST_TIMING_INFO

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

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

フィールド

フィールドサイズx64x86説明
RequestTimingCountDWORD4+0+0RequestTiming配列に含まれるタイミング計測値の数である。
RequestTimingULONGLONG240+8+8要求処理の各段階のタイミング値(64ビット)の可変長配列である。

各言語での定義

#include <windows.h>

// HTTP_REQUEST_TIMING_INFO  (x64 248 / x86 248 バイト)
typedef struct HTTP_REQUEST_TIMING_INFO {
    DWORD RequestTimingCount;
    ULONGLONG RequestTiming[30];
} HTTP_REQUEST_TIMING_INFO;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct HTTP_REQUEST_TIMING_INFO
{
    public uint RequestTimingCount;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30)] public ulong[] RequestTiming;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure HTTP_REQUEST_TIMING_INFO
    Public RequestTimingCount As UInteger
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=30)> Public RequestTiming() As ULong
End Structure
import ctypes
from ctypes import wintypes

class HTTP_REQUEST_TIMING_INFO(ctypes.Structure):
    _fields_ = [
        ("RequestTimingCount", wintypes.DWORD),
        ("RequestTiming", ctypes.c_ulonglong * 30),
    ]
#[repr(C)]
pub struct HTTP_REQUEST_TIMING_INFO {
    pub RequestTimingCount: u32,
    pub RequestTiming: [u64; 30],
}
import "golang.org/x/sys/windows"

type HTTP_REQUEST_TIMING_INFO struct {
	RequestTimingCount uint32
	RequestTiming [30]uint64
}
type
  HTTP_REQUEST_TIMING_INFO = record
    RequestTimingCount: DWORD;
    RequestTiming: array[0..29] of UInt64;
  end;
const HTTP_REQUEST_TIMING_INFO = extern struct {
    RequestTimingCount: u32,
    RequestTiming: [30]u64,
};
type
  HTTP_REQUEST_TIMING_INFO {.bycopy.} = object
    RequestTimingCount: uint32
    RequestTiming: array[30, uint64]
struct HTTP_REQUEST_TIMING_INFO
{
    uint RequestTimingCount;
    ulong[30] RequestTiming;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; HTTP_REQUEST_TIMING_INFO サイズ: 248 バイト(x64)
dim st, 62    ; 4byte整数×62(構造体サイズ 248 / 4 切り上げ)
; RequestTimingCount : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; RequestTiming : ULONGLONG (+8, 240byte)  varptr(st)+8 を基点に操作(240byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global HTTP_REQUEST_TIMING_INFO
    #field int RequestTimingCount
    #field int64 RequestTiming 30
#endstruct

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