ホーム › System.Iis › HSE_SEND_HEADER_EX_INFO
HSE_SEND_HEADER_EX_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pszStatus | LPSTR | 8/4 | +0 | +0 | 応答のステータス行文字列を示すLPSTRである。 |
| pszHeader | LPSTR | 8/4 | +8 | +4 | 送信するHTTPヘッダ文字列を示すLPSTRである。 |
| cchStatus | DWORD | 4 | +16 | +8 | ステータス文字列の文字数を示すDWORDである。 |
| cchHeader | DWORD | 4 | +20 | +12 | ヘッダ文字列の文字数を示すDWORDである。 |
| fKeepConn | BOOL | 4 | +24 | +16 | 接続をキープアライブするかを示すBOOLである。 |
各言語での定義
#include <windows.h>
// HSE_SEND_HEADER_EX_INFO (x64 32 / x86 20 バイト)
typedef struct HSE_SEND_HEADER_EX_INFO {
LPSTR pszStatus;
LPSTR pszHeader;
DWORD cchStatus;
DWORD cchHeader;
BOOL fKeepConn;
} HSE_SEND_HEADER_EX_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct HSE_SEND_HEADER_EX_INFO
{
public IntPtr pszStatus;
public IntPtr pszHeader;
public uint cchStatus;
public uint cchHeader;
[MarshalAs(UnmanagedType.Bool)] public bool fKeepConn;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure HSE_SEND_HEADER_EX_INFO
Public pszStatus As IntPtr
Public pszHeader As IntPtr
Public cchStatus As UInteger
Public cchHeader As UInteger
<MarshalAs(UnmanagedType.Bool)> Public fKeepConn As Boolean
End Structureimport ctypes
from ctypes import wintypes
class HSE_SEND_HEADER_EX_INFO(ctypes.Structure):
_fields_ = [
("pszStatus", ctypes.c_void_p),
("pszHeader", ctypes.c_void_p),
("cchStatus", wintypes.DWORD),
("cchHeader", wintypes.DWORD),
("fKeepConn", wintypes.BOOL),
]#[repr(C)]
pub struct HSE_SEND_HEADER_EX_INFO {
pub pszStatus: *mut core::ffi::c_void,
pub pszHeader: *mut core::ffi::c_void,
pub cchStatus: u32,
pub cchHeader: u32,
pub fKeepConn: i32,
}import "golang.org/x/sys/windows"
type HSE_SEND_HEADER_EX_INFO struct {
pszStatus uintptr
pszHeader uintptr
cchStatus uint32
cchHeader uint32
fKeepConn int32
}type
HSE_SEND_HEADER_EX_INFO = record
pszStatus: Pointer;
pszHeader: Pointer;
cchStatus: DWORD;
cchHeader: DWORD;
fKeepConn: BOOL;
end;const HSE_SEND_HEADER_EX_INFO = extern struct {
pszStatus: ?*anyopaque,
pszHeader: ?*anyopaque,
cchStatus: u32,
cchHeader: u32,
fKeepConn: i32,
};type
HSE_SEND_HEADER_EX_INFO {.bycopy.} = object
pszStatus: pointer
pszHeader: pointer
cchStatus: uint32
cchHeader: uint32
fKeepConn: int32struct HSE_SEND_HEADER_EX_INFO
{
void* pszStatus;
void* pszHeader;
uint cchStatus;
uint cchHeader;
int fKeepConn;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; HSE_SEND_HEADER_EX_INFO サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; pszStatus : LPSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pszHeader : LPSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; cchStatus : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cchHeader : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; fKeepConn : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; HSE_SEND_HEADER_EX_INFO サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; pszStatus : LPSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; pszHeader : LPSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; cchStatus : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; cchHeader : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; fKeepConn : BOOL (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global HSE_SEND_HEADER_EX_INFO
#field intptr pszStatus
#field intptr pszHeader
#field int cchStatus
#field int cchHeader
#field bool fKeepConn
#endstruct
stdim st, HSE_SEND_HEADER_EX_INFO ; NSTRUCT 変数を確保
st->cchStatus = 100
mes "cchStatus=" + st->cchStatus