ホーム › System.Iis › LOGGING_PARAMETERS
LOGGING_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pszSessionId | LPWSTR | 8/4 | +0 | +0 | FTPセッションを一意に識別するセッションID文字列である。 |
| pszSiteName | LPWSTR | 8/4 | +8 | +4 | 対象FTPサイト名を示す文字列である。 |
| pszUserName | LPWSTR | 8/4 | +16 | +8 | 認証されたユーザー名を示す文字列である。 |
| pszHostName | LPWSTR | 8/4 | +24 | +12 | 接続ホスト名を示す文字列である。 |
| pszRemoteIpAddress | LPWSTR | 8/4 | +32 | +16 | リモート(クライアント)IPアドレスを示す文字列である。 |
| dwRemoteIpPort | DWORD | 4 | +40 | +20 | リモート(クライアント)ポート番号を示すDWORDである。 |
| pszLocalIpAddress | LPWSTR | 8/4 | +48 | +24 | ローカル(サーバー)IPアドレスを示す文字列である。 |
| dwLocalIpPort | DWORD | 4 | +56 | +28 | ローカル(サーバー)ポート番号を示すDWORDである。 |
| BytesSent | ULONGLONG | 8 | +64 | +32 | 送信バイト数を示すULONGLONGである。 |
| BytesReceived | ULONGLONG | 8 | +72 | +40 | 受信バイト数を示すULONGLONGである。 |
| pszCommand | LPWSTR | 8/4 | +80 | +48 | 実行されたFTPコマンドを示す文字列である。 |
| pszCommandParameters | LPWSTR | 8/4 | +88 | +52 | FTPコマンドのパラメータを示す文字列である。 |
| pszFullPath | LPWSTR | 8/4 | +96 | +56 | 対象のフルパスを示す文字列である。 |
| dwElapsedMilliseconds | DWORD | 4 | +104 | +60 | 処理に要した経過時間をミリ秒で示すDWORDである。 |
| FtpStatus | DWORD | 4 | +108 | +64 | FTP応答ステータスコードを示すDWORDである。 |
| FtpSubStatus | DWORD | 4 | +112 | +68 | FTPサブステータスコードを示すDWORDである。 |
| hrStatus | HRESULT | 4 | +116 | +72 | 処理結果を示すHRESULTである。 |
| pszInformation | LPWSTR | 8/4 | +120 | +76 | 追加情報を示す文字列である。 |
各言語での定義
#include <windows.h>
// LOGGING_PARAMETERS (x64 128 / x86 80 バイト)
typedef struct LOGGING_PARAMETERS {
LPWSTR pszSessionId;
LPWSTR pszSiteName;
LPWSTR pszUserName;
LPWSTR pszHostName;
LPWSTR pszRemoteIpAddress;
DWORD dwRemoteIpPort;
LPWSTR pszLocalIpAddress;
DWORD dwLocalIpPort;
ULONGLONG BytesSent;
ULONGLONG BytesReceived;
LPWSTR pszCommand;
LPWSTR pszCommandParameters;
LPWSTR pszFullPath;
DWORD dwElapsedMilliseconds;
DWORD FtpStatus;
DWORD FtpSubStatus;
HRESULT hrStatus;
LPWSTR pszInformation;
} LOGGING_PARAMETERS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LOGGING_PARAMETERS
{
public IntPtr pszSessionId;
public IntPtr pszSiteName;
public IntPtr pszUserName;
public IntPtr pszHostName;
public IntPtr pszRemoteIpAddress;
public uint dwRemoteIpPort;
public IntPtr pszLocalIpAddress;
public uint dwLocalIpPort;
public ulong BytesSent;
public ulong BytesReceived;
public IntPtr pszCommand;
public IntPtr pszCommandParameters;
public IntPtr pszFullPath;
public uint dwElapsedMilliseconds;
public uint FtpStatus;
public uint FtpSubStatus;
public int hrStatus;
public IntPtr pszInformation;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure LOGGING_PARAMETERS
Public pszSessionId As IntPtr
Public pszSiteName As IntPtr
Public pszUserName As IntPtr
Public pszHostName As IntPtr
Public pszRemoteIpAddress As IntPtr
Public dwRemoteIpPort As UInteger
Public pszLocalIpAddress As IntPtr
Public dwLocalIpPort As UInteger
Public BytesSent As ULong
Public BytesReceived As ULong
Public pszCommand As IntPtr
Public pszCommandParameters As IntPtr
Public pszFullPath As IntPtr
Public dwElapsedMilliseconds As UInteger
Public FtpStatus As UInteger
Public FtpSubStatus As UInteger
Public hrStatus As Integer
Public pszInformation As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class LOGGING_PARAMETERS(ctypes.Structure):
_fields_ = [
("pszSessionId", ctypes.c_void_p),
("pszSiteName", ctypes.c_void_p),
("pszUserName", ctypes.c_void_p),
("pszHostName", ctypes.c_void_p),
("pszRemoteIpAddress", ctypes.c_void_p),
("dwRemoteIpPort", wintypes.DWORD),
("pszLocalIpAddress", ctypes.c_void_p),
("dwLocalIpPort", wintypes.DWORD),
("BytesSent", ctypes.c_ulonglong),
("BytesReceived", ctypes.c_ulonglong),
("pszCommand", ctypes.c_void_p),
("pszCommandParameters", ctypes.c_void_p),
("pszFullPath", ctypes.c_void_p),
("dwElapsedMilliseconds", wintypes.DWORD),
("FtpStatus", wintypes.DWORD),
("FtpSubStatus", wintypes.DWORD),
("hrStatus", ctypes.c_int),
("pszInformation", ctypes.c_void_p),
]#[repr(C)]
pub struct LOGGING_PARAMETERS {
pub pszSessionId: *mut core::ffi::c_void,
pub pszSiteName: *mut core::ffi::c_void,
pub pszUserName: *mut core::ffi::c_void,
pub pszHostName: *mut core::ffi::c_void,
pub pszRemoteIpAddress: *mut core::ffi::c_void,
pub dwRemoteIpPort: u32,
pub pszLocalIpAddress: *mut core::ffi::c_void,
pub dwLocalIpPort: u32,
pub BytesSent: u64,
pub BytesReceived: u64,
pub pszCommand: *mut core::ffi::c_void,
pub pszCommandParameters: *mut core::ffi::c_void,
pub pszFullPath: *mut core::ffi::c_void,
pub dwElapsedMilliseconds: u32,
pub FtpStatus: u32,
pub FtpSubStatus: u32,
pub hrStatus: i32,
pub pszInformation: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type LOGGING_PARAMETERS struct {
pszSessionId uintptr
pszSiteName uintptr
pszUserName uintptr
pszHostName uintptr
pszRemoteIpAddress uintptr
dwRemoteIpPort uint32
pszLocalIpAddress uintptr
dwLocalIpPort uint32
BytesSent uint64
BytesReceived uint64
pszCommand uintptr
pszCommandParameters uintptr
pszFullPath uintptr
dwElapsedMilliseconds uint32
FtpStatus uint32
FtpSubStatus uint32
hrStatus int32
pszInformation uintptr
}type
LOGGING_PARAMETERS = record
pszSessionId: Pointer;
pszSiteName: Pointer;
pszUserName: Pointer;
pszHostName: Pointer;
pszRemoteIpAddress: Pointer;
dwRemoteIpPort: DWORD;
pszLocalIpAddress: Pointer;
dwLocalIpPort: DWORD;
BytesSent: UInt64;
BytesReceived: UInt64;
pszCommand: Pointer;
pszCommandParameters: Pointer;
pszFullPath: Pointer;
dwElapsedMilliseconds: DWORD;
FtpStatus: DWORD;
FtpSubStatus: DWORD;
hrStatus: Integer;
pszInformation: Pointer;
end;const LOGGING_PARAMETERS = extern struct {
pszSessionId: ?*anyopaque,
pszSiteName: ?*anyopaque,
pszUserName: ?*anyopaque,
pszHostName: ?*anyopaque,
pszRemoteIpAddress: ?*anyopaque,
dwRemoteIpPort: u32,
pszLocalIpAddress: ?*anyopaque,
dwLocalIpPort: u32,
BytesSent: u64,
BytesReceived: u64,
pszCommand: ?*anyopaque,
pszCommandParameters: ?*anyopaque,
pszFullPath: ?*anyopaque,
dwElapsedMilliseconds: u32,
FtpStatus: u32,
FtpSubStatus: u32,
hrStatus: i32,
pszInformation: ?*anyopaque,
};type
LOGGING_PARAMETERS {.bycopy.} = object
pszSessionId: pointer
pszSiteName: pointer
pszUserName: pointer
pszHostName: pointer
pszRemoteIpAddress: pointer
dwRemoteIpPort: uint32
pszLocalIpAddress: pointer
dwLocalIpPort: uint32
BytesSent: uint64
BytesReceived: uint64
pszCommand: pointer
pszCommandParameters: pointer
pszFullPath: pointer
dwElapsedMilliseconds: uint32
FtpStatus: uint32
FtpSubStatus: uint32
hrStatus: int32
pszInformation: pointerstruct LOGGING_PARAMETERS
{
void* pszSessionId;
void* pszSiteName;
void* pszUserName;
void* pszHostName;
void* pszRemoteIpAddress;
uint dwRemoteIpPort;
void* pszLocalIpAddress;
uint dwLocalIpPort;
ulong BytesSent;
ulong BytesReceived;
void* pszCommand;
void* pszCommandParameters;
void* pszFullPath;
uint dwElapsedMilliseconds;
uint FtpStatus;
uint FtpSubStatus;
int hrStatus;
void* pszInformation;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; LOGGING_PARAMETERS サイズ: 80 バイト(x86)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; pszSessionId : LPWSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pszSiteName : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pszUserName : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pszHostName : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pszRemoteIpAddress : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwRemoteIpPort : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; pszLocalIpAddress : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwLocalIpPort : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; BytesSent : ULONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; BytesReceived : ULONGLONG (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; pszCommand : LPWSTR (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; pszCommandParameters : LPWSTR (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; pszFullPath : LPWSTR (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; dwElapsedMilliseconds : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; FtpStatus : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; FtpSubStatus : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; hrStatus : HRESULT (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; pszInformation : LPWSTR (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LOGGING_PARAMETERS サイズ: 128 バイト(x64)
dim st, 32 ; 4byte整数×32(構造体サイズ 128 / 4 切り上げ)
; pszSessionId : LPWSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; pszSiteName : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pszUserName : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pszHostName : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pszRemoteIpAddress : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; dwRemoteIpPort : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; pszLocalIpAddress : LPWSTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; dwLocalIpPort : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; BytesSent : ULONGLONG (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; BytesReceived : ULONGLONG (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; pszCommand : LPWSTR (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; pszCommandParameters : LPWSTR (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; pszFullPath : LPWSTR (+96, 8byte) qpoke st,96,値 / qpeek(st,96) ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; dwElapsedMilliseconds : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; FtpStatus : DWORD (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; FtpSubStatus : DWORD (+112, 4byte) st.28 = 値 / 値 = st.28 (lpoke/lpeek も可)
; hrStatus : HRESULT (+116, 4byte) st.29 = 値 / 値 = st.29 (lpoke/lpeek も可)
; pszInformation : LPWSTR (+120, 8byte) qpoke st,120,値 / qpeek(st,120) ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LOGGING_PARAMETERS
#field intptr pszSessionId
#field intptr pszSiteName
#field intptr pszUserName
#field intptr pszHostName
#field intptr pszRemoteIpAddress
#field int dwRemoteIpPort
#field intptr pszLocalIpAddress
#field int dwLocalIpPort
#field int64 BytesSent
#field int64 BytesReceived
#field intptr pszCommand
#field intptr pszCommandParameters
#field intptr pszFullPath
#field int dwElapsedMilliseconds
#field int FtpStatus
#field int FtpSubStatus
#field int hrStatus
#field intptr pszInformation
#endstruct
stdim st, LOGGING_PARAMETERS ; NSTRUCT 変数を確保
st->dwRemoteIpPort = 100
mes "dwRemoteIpPort=" + st->dwRemoteIpPort