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

HTTP_FILTER_LOG

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

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

フィールド

フィールドサイズx64x86説明
pszClientHostNameLPSTR8/4+0+0クライアントのホスト名を示すLPSTRである。
pszClientUserNameLPSTR8/4+8+4クライアントのユーザー名を示すLPSTRである。
pszServerNameLPSTR8/4+16+8サーバー名を示すLPSTRである。
pszOperationLPSTR8/4+24+12実行された操作(メソッド)を示すLPSTRである。
pszTargetLPSTR8/4+32+16操作対象(URL等)を示すLPSTRである。
pszParametersLPSTR8/4+40+20操作のパラメータを示すLPSTRである。
dwHttpStatusDWORD4+48+24応答のHTTPステータスコードを示すDWORDである。
dwWin32StatusDWORD4+52+28対応するWin32ステータスコードを示すDWORDである。
dwBytesSentDWORD4+56+32送信バイト数を示すDWORDである。
dwBytesRecvdDWORD4+60+36受信バイト数を示すDWORDである。
msTimeForProcessingDWORD4+64+40処理に要した時間をミリ秒で示すDWORDである。

各言語での定義

#include <windows.h>

// HTTP_FILTER_LOG  (x64 72 / x86 44 バイト)
typedef struct HTTP_FILTER_LOG {
    LPSTR pszClientHostName;
    LPSTR pszClientUserName;
    LPSTR pszServerName;
    LPSTR pszOperation;
    LPSTR pszTarget;
    LPSTR pszParameters;
    DWORD dwHttpStatus;
    DWORD dwWin32Status;
    DWORD dwBytesSent;
    DWORD dwBytesRecvd;
    DWORD msTimeForProcessing;
} HTTP_FILTER_LOG;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct HTTP_FILTER_LOG
{
    public IntPtr pszClientHostName;
    public IntPtr pszClientUserName;
    public IntPtr pszServerName;
    public IntPtr pszOperation;
    public IntPtr pszTarget;
    public IntPtr pszParameters;
    public uint dwHttpStatus;
    public uint dwWin32Status;
    public uint dwBytesSent;
    public uint dwBytesRecvd;
    public uint msTimeForProcessing;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure HTTP_FILTER_LOG
    Public pszClientHostName As IntPtr
    Public pszClientUserName As IntPtr
    Public pszServerName As IntPtr
    Public pszOperation As IntPtr
    Public pszTarget As IntPtr
    Public pszParameters As IntPtr
    Public dwHttpStatus As UInteger
    Public dwWin32Status As UInteger
    Public dwBytesSent As UInteger
    Public dwBytesRecvd As UInteger
    Public msTimeForProcessing As UInteger
End Structure
import ctypes
from ctypes import wintypes

class HTTP_FILTER_LOG(ctypes.Structure):
    _fields_ = [
        ("pszClientHostName", ctypes.c_void_p),
        ("pszClientUserName", ctypes.c_void_p),
        ("pszServerName", ctypes.c_void_p),
        ("pszOperation", ctypes.c_void_p),
        ("pszTarget", ctypes.c_void_p),
        ("pszParameters", ctypes.c_void_p),
        ("dwHttpStatus", wintypes.DWORD),
        ("dwWin32Status", wintypes.DWORD),
        ("dwBytesSent", wintypes.DWORD),
        ("dwBytesRecvd", wintypes.DWORD),
        ("msTimeForProcessing", wintypes.DWORD),
    ]
#[repr(C)]
pub struct HTTP_FILTER_LOG {
    pub pszClientHostName: *mut core::ffi::c_void,
    pub pszClientUserName: *mut core::ffi::c_void,
    pub pszServerName: *mut core::ffi::c_void,
    pub pszOperation: *mut core::ffi::c_void,
    pub pszTarget: *mut core::ffi::c_void,
    pub pszParameters: *mut core::ffi::c_void,
    pub dwHttpStatus: u32,
    pub dwWin32Status: u32,
    pub dwBytesSent: u32,
    pub dwBytesRecvd: u32,
    pub msTimeForProcessing: u32,
}
import "golang.org/x/sys/windows"

type HTTP_FILTER_LOG struct {
	pszClientHostName uintptr
	pszClientUserName uintptr
	pszServerName uintptr
	pszOperation uintptr
	pszTarget uintptr
	pszParameters uintptr
	dwHttpStatus uint32
	dwWin32Status uint32
	dwBytesSent uint32
	dwBytesRecvd uint32
	msTimeForProcessing uint32
}
type
  HTTP_FILTER_LOG = record
    pszClientHostName: Pointer;
    pszClientUserName: Pointer;
    pszServerName: Pointer;
    pszOperation: Pointer;
    pszTarget: Pointer;
    pszParameters: Pointer;
    dwHttpStatus: DWORD;
    dwWin32Status: DWORD;
    dwBytesSent: DWORD;
    dwBytesRecvd: DWORD;
    msTimeForProcessing: DWORD;
  end;
const HTTP_FILTER_LOG = extern struct {
    pszClientHostName: ?*anyopaque,
    pszClientUserName: ?*anyopaque,
    pszServerName: ?*anyopaque,
    pszOperation: ?*anyopaque,
    pszTarget: ?*anyopaque,
    pszParameters: ?*anyopaque,
    dwHttpStatus: u32,
    dwWin32Status: u32,
    dwBytesSent: u32,
    dwBytesRecvd: u32,
    msTimeForProcessing: u32,
};
type
  HTTP_FILTER_LOG {.bycopy.} = object
    pszClientHostName: pointer
    pszClientUserName: pointer
    pszServerName: pointer
    pszOperation: pointer
    pszTarget: pointer
    pszParameters: pointer
    dwHttpStatus: uint32
    dwWin32Status: uint32
    dwBytesSent: uint32
    dwBytesRecvd: uint32
    msTimeForProcessing: uint32
struct HTTP_FILTER_LOG
{
    void* pszClientHostName;
    void* pszClientUserName;
    void* pszServerName;
    void* pszOperation;
    void* pszTarget;
    void* pszParameters;
    uint dwHttpStatus;
    uint dwWin32Status;
    uint dwBytesSent;
    uint dwBytesRecvd;
    uint msTimeForProcessing;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; HTTP_FILTER_LOG サイズ: 44 バイト(x86)
dim st, 11    ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; pszClientHostName : LPSTR (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; pszClientUserName : LPSTR (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; pszServerName : LPSTR (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; pszOperation : LPSTR (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; pszTarget : LPSTR (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; pszParameters : LPSTR (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; dwHttpStatus : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; dwWin32Status : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; dwBytesSent : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; dwBytesRecvd : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; msTimeForProcessing : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; HTTP_FILTER_LOG サイズ: 72 バイト(x64)
dim st, 18    ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; pszClientHostName : LPSTR (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; pszClientUserName : LPSTR (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pszServerName : LPSTR (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pszOperation : LPSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pszTarget : LPSTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; pszParameters : LPSTR (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; dwHttpStatus : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; dwWin32Status : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; dwBytesSent : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; dwBytesRecvd : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; msTimeForProcessing : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global HTTP_FILTER_LOG
    #field intptr pszClientHostName
    #field intptr pszClientUserName
    #field intptr pszServerName
    #field intptr pszOperation
    #field intptr pszTarget
    #field intptr pszParameters
    #field int dwHttpStatus
    #field int dwWin32Status
    #field int dwBytesSent
    #field int dwBytesRecvd
    #field int msTimeForProcessing
#endstruct

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