ホーム › Networking.WinInet › HTTP_REQUEST_TIMES
HTTP_REQUEST_TIMES
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cTimes | DWORD | 4 | +0 | +0 | rgTimes配列に格納された時刻エントリの数である。 |
| rgTimes | ULONGLONG | 256 | +8 | +8 | HTTPリクエスト処理の各段階の経過時刻を保持する配列である。単位は100ナノ秒。 |
各言語での定義
#include <windows.h>
// HTTP_REQUEST_TIMES (x64 264 / x86 264 バイト)
typedef struct HTTP_REQUEST_TIMES {
DWORD cTimes;
ULONGLONG rgTimes[32];
} HTTP_REQUEST_TIMES;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct HTTP_REQUEST_TIMES
{
public uint cTimes;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public ulong[] rgTimes;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure HTTP_REQUEST_TIMES
Public cTimes As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public rgTimes() As ULong
End Structureimport ctypes
from ctypes import wintypes
class HTTP_REQUEST_TIMES(ctypes.Structure):
_fields_ = [
("cTimes", wintypes.DWORD),
("rgTimes", ctypes.c_ulonglong * 32),
]#[repr(C)]
pub struct HTTP_REQUEST_TIMES {
pub cTimes: u32,
pub rgTimes: [u64; 32],
}import "golang.org/x/sys/windows"
type HTTP_REQUEST_TIMES struct {
cTimes uint32
rgTimes [32]uint64
}type
HTTP_REQUEST_TIMES = record
cTimes: DWORD;
rgTimes: array[0..31] of UInt64;
end;const HTTP_REQUEST_TIMES = extern struct {
cTimes: u32,
rgTimes: [32]u64,
};type
HTTP_REQUEST_TIMES {.bycopy.} = object
cTimes: uint32
rgTimes: array[32, uint64]struct HTTP_REQUEST_TIMES
{
uint cTimes;
ulong[32] rgTimes;
}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_TIMES サイズ: 264 バイト(x64)
dim st, 66 ; 4byte整数×66(構造体サイズ 264 / 4 切り上げ)
; cTimes : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; rgTimes : ULONGLONG (+8, 256byte) varptr(st)+8 を基点に操作(256byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global HTTP_REQUEST_TIMES
#field int cTimes
#field int64 rgTimes 32
#endstruct
stdim st, HTTP_REQUEST_TIMES ; NSTRUCT 変数を確保
st->cTimes = 100
mes "cTimes=" + st->cTimes