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

HSE_VERSION_INFO

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

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

フィールド

フィールドサイズx64x86説明
dwExtensionVersionDWORD4+0+0ISAPI拡張のバージョン番号を示すDWORDである。
lpszExtensionDescCHAR256+4+4拡張の説明文字列を格納するCHAR配列である。

各言語での定義

#include <windows.h>

// HSE_VERSION_INFO  (x64 260 / x86 260 バイト)
typedef struct HSE_VERSION_INFO {
    DWORD dwExtensionVersion;
    CHAR lpszExtensionDesc[256];
} HSE_VERSION_INFO;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct HSE_VERSION_INFO
{
    public uint dwExtensionVersion;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] public sbyte[] lpszExtensionDesc;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure HSE_VERSION_INFO
    Public dwExtensionVersion As UInteger
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=256)> Public lpszExtensionDesc() As SByte
End Structure
import ctypes
from ctypes import wintypes

class HSE_VERSION_INFO(ctypes.Structure):
    _fields_ = [
        ("dwExtensionVersion", wintypes.DWORD),
        ("lpszExtensionDesc", ctypes.c_byte * 256),
    ]
#[repr(C)]
pub struct HSE_VERSION_INFO {
    pub dwExtensionVersion: u32,
    pub lpszExtensionDesc: [i8; 256],
}
import "golang.org/x/sys/windows"

type HSE_VERSION_INFO struct {
	dwExtensionVersion uint32
	lpszExtensionDesc [256]int8
}
type
  HSE_VERSION_INFO = record
    dwExtensionVersion: DWORD;
    lpszExtensionDesc: array[0..255] of Shortint;
  end;
const HSE_VERSION_INFO = extern struct {
    dwExtensionVersion: u32,
    lpszExtensionDesc: [256]i8,
};
type
  HSE_VERSION_INFO {.bycopy.} = object
    dwExtensionVersion: uint32
    lpszExtensionDesc: array[256, int8]
struct HSE_VERSION_INFO
{
    uint dwExtensionVersion;
    byte[256] lpszExtensionDesc;
}

HSP用 定義

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

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

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