Win32 API 日本語リファレンス
ホームNetworking.HttpServer › HttpQueryRequestQueueProperty

HttpQueryRequestQueueProperty

関数
リクエストキューのプロパティを取得する。
DLLHTTPAPI.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

// HTTPAPI.dll
#include <windows.h>

DWORD HttpQueryRequestQueueProperty(
    HANDLE RequestQueueHandle,
    HTTP_SERVER_PROPERTY Property,
    void* PropertyInformation,   // optional
    DWORD PropertyInformationLength,
    DWORD Reserved1,   // optional
    DWORD* ReturnLength,   // optional
    void* Reserved2   // optional
);

パラメーター

名前方向
RequestQueueHandleHANDLEin
PropertyHTTP_SERVER_PROPERTYin
PropertyInformationvoid*outoptional
PropertyInformationLengthDWORDin
Reserved1DWORDoptional
ReturnLengthDWORD*outoptional
Reserved2void*optional

戻り値の型: DWORD

各言語での呼び出し定義

// HTTPAPI.dll
#include <windows.h>

DWORD HttpQueryRequestQueueProperty(
    HANDLE RequestQueueHandle,
    HTTP_SERVER_PROPERTY Property,
    void* PropertyInformation,   // optional
    DWORD PropertyInformationLength,
    DWORD Reserved1,   // optional
    DWORD* ReturnLength,   // optional
    void* Reserved2   // optional
);
[DllImport("HTTPAPI.dll", ExactSpelling = true)]
static extern uint HttpQueryRequestQueueProperty(
    IntPtr RequestQueueHandle,   // HANDLE
    int Property,   // HTTP_SERVER_PROPERTY
    IntPtr PropertyInformation,   // void* optional, out
    uint PropertyInformationLength,   // DWORD
    uint Reserved1,   // DWORD optional
    IntPtr ReturnLength,   // DWORD* optional, out
    IntPtr Reserved2   // void* optional
);
<DllImport("HTTPAPI.dll", ExactSpelling:=True)>
Public Shared Function HttpQueryRequestQueueProperty(
    RequestQueueHandle As IntPtr,   ' HANDLE
    [Property] As Integer,   ' HTTP_SERVER_PROPERTY
    PropertyInformation As IntPtr,   ' void* optional, out
    PropertyInformationLength As UInteger,   ' DWORD
    Reserved1 As UInteger,   ' DWORD optional
    ReturnLength As IntPtr,   ' DWORD* optional, out
    Reserved2 As IntPtr   ' void* optional
) As UInteger
End Function
' RequestQueueHandle : HANDLE
' Property : HTTP_SERVER_PROPERTY
' PropertyInformation : void* optional, out
' PropertyInformationLength : DWORD
' Reserved1 : DWORD optional
' ReturnLength : DWORD* optional, out
' Reserved2 : void* optional
Declare PtrSafe Function HttpQueryRequestQueueProperty Lib "httpapi" ( _
    ByVal RequestQueueHandle As LongPtr, _
    ByVal Property As Long, _
    ByVal PropertyInformation As LongPtr, _
    ByVal PropertyInformationLength As Long, _
    ByVal Reserved1 As Long, _
    ByVal ReturnLength As LongPtr, _
    ByVal Reserved2 As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

HttpQueryRequestQueueProperty = ctypes.windll.httpapi.HttpQueryRequestQueueProperty
HttpQueryRequestQueueProperty.restype = wintypes.DWORD
HttpQueryRequestQueueProperty.argtypes = [
    wintypes.HANDLE,  # RequestQueueHandle : HANDLE
    ctypes.c_int,  # Property : HTTP_SERVER_PROPERTY
    ctypes.POINTER(None),  # PropertyInformation : void* optional, out
    wintypes.DWORD,  # PropertyInformationLength : DWORD
    wintypes.DWORD,  # Reserved1 : DWORD optional
    ctypes.POINTER(wintypes.DWORD),  # ReturnLength : DWORD* optional, out
    ctypes.POINTER(None),  # Reserved2 : void* optional
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('HTTPAPI.dll')
HttpQueryRequestQueueProperty = Fiddle::Function.new(
  lib['HttpQueryRequestQueueProperty'],
  [
    Fiddle::TYPE_VOIDP,  # RequestQueueHandle : HANDLE
    Fiddle::TYPE_INT,  # Property : HTTP_SERVER_PROPERTY
    Fiddle::TYPE_VOIDP,  # PropertyInformation : void* optional, out
    -Fiddle::TYPE_INT,  # PropertyInformationLength : DWORD
    -Fiddle::TYPE_INT,  # Reserved1 : DWORD optional
    Fiddle::TYPE_VOIDP,  # ReturnLength : DWORD* optional, out
    Fiddle::TYPE_VOIDP,  # Reserved2 : void* optional
  ],
  -Fiddle::TYPE_INT)
#[link(name = "httpapi")]
extern "system" {
    fn HttpQueryRequestQueueProperty(
        RequestQueueHandle: *mut core::ffi::c_void,  // HANDLE
        Property: i32,  // HTTP_SERVER_PROPERTY
        PropertyInformation: *mut (),  // void* optional, out
        PropertyInformationLength: u32,  // DWORD
        Reserved1: u32,  // DWORD optional
        ReturnLength: *mut u32,  // DWORD* optional, out
        Reserved2: *mut ()  // void* optional
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("HTTPAPI.dll")]
public static extern uint HttpQueryRequestQueueProperty(IntPtr RequestQueueHandle, int Property, IntPtr PropertyInformation, uint PropertyInformationLength, uint Reserved1, IntPtr ReturnLength, IntPtr Reserved2);
"@
$api = Add-Type -MemberDefinition $sig -Name 'HTTPAPI_HttpQueryRequestQueueProperty' -Namespace Win32 -PassThru
# $api::HttpQueryRequestQueueProperty(RequestQueueHandle, Property, PropertyInformation, PropertyInformationLength, Reserved1, ReturnLength, Reserved2)
#uselib "HTTPAPI.dll"
#func global HttpQueryRequestQueueProperty "HttpQueryRequestQueueProperty" sptr, sptr, sptr, sptr, sptr, sptr, sptr
; HttpQueryRequestQueueProperty RequestQueueHandle, Property, PropertyInformation, PropertyInformationLength, Reserved1, varptr(ReturnLength), Reserved2   ; 戻り値は stat
; RequestQueueHandle : HANDLE -> "sptr"
; Property : HTTP_SERVER_PROPERTY -> "sptr"
; PropertyInformation : void* optional, out -> "sptr"
; PropertyInformationLength : DWORD -> "sptr"
; Reserved1 : DWORD optional -> "sptr"
; ReturnLength : DWORD* optional, out -> "sptr"
; Reserved2 : void* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "HTTPAPI.dll"
#cfunc global HttpQueryRequestQueueProperty "HttpQueryRequestQueueProperty" sptr, int, sptr, int, int, var, sptr
; res = HttpQueryRequestQueueProperty(RequestQueueHandle, Property, PropertyInformation, PropertyInformationLength, Reserved1, ReturnLength, Reserved2)
; RequestQueueHandle : HANDLE -> "sptr"
; Property : HTTP_SERVER_PROPERTY -> "int"
; PropertyInformation : void* optional, out -> "sptr"
; PropertyInformationLength : DWORD -> "int"
; Reserved1 : DWORD optional -> "int"
; ReturnLength : DWORD* optional, out -> "var"
; Reserved2 : void* optional -> "sptr"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; DWORD HttpQueryRequestQueueProperty(HANDLE RequestQueueHandle, HTTP_SERVER_PROPERTY Property, void* PropertyInformation, DWORD PropertyInformationLength, DWORD Reserved1, DWORD* ReturnLength, void* Reserved2)
#uselib "HTTPAPI.dll"
#cfunc global HttpQueryRequestQueueProperty "HttpQueryRequestQueueProperty" intptr, int, intptr, int, int, var, intptr
; res = HttpQueryRequestQueueProperty(RequestQueueHandle, Property, PropertyInformation, PropertyInformationLength, Reserved1, ReturnLength, Reserved2)
; RequestQueueHandle : HANDLE -> "intptr"
; Property : HTTP_SERVER_PROPERTY -> "int"
; PropertyInformation : void* optional, out -> "intptr"
; PropertyInformationLength : DWORD -> "int"
; Reserved1 : DWORD optional -> "int"
; ReturnLength : DWORD* optional, out -> "var"
; Reserved2 : void* optional -> "intptr"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	httpapi = windows.NewLazySystemDLL("HTTPAPI.dll")
	procHttpQueryRequestQueueProperty = httpapi.NewProc("HttpQueryRequestQueueProperty")
)

// RequestQueueHandle (HANDLE), Property (HTTP_SERVER_PROPERTY), PropertyInformation (void* optional, out), PropertyInformationLength (DWORD), Reserved1 (DWORD optional), ReturnLength (DWORD* optional, out), Reserved2 (void* optional)
r1, _, err := procHttpQueryRequestQueueProperty.Call(
	uintptr(RequestQueueHandle),
	uintptr(Property),
	uintptr(PropertyInformation),
	uintptr(PropertyInformationLength),
	uintptr(Reserved1),
	uintptr(ReturnLength),
	uintptr(Reserved2),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function HttpQueryRequestQueueProperty(
  RequestQueueHandle: THandle;   // HANDLE
  Property: Integer;   // HTTP_SERVER_PROPERTY
  PropertyInformation: Pointer;   // void* optional, out
  PropertyInformationLength: DWORD;   // DWORD
  Reserved1: DWORD;   // DWORD optional
  ReturnLength: Pointer;   // DWORD* optional, out
  Reserved2: Pointer   // void* optional
): DWORD; stdcall;
  external 'HTTPAPI.dll' name 'HttpQueryRequestQueueProperty';
result := DllCall("HTTPAPI\HttpQueryRequestQueueProperty"
    , "Ptr", RequestQueueHandle   ; HANDLE
    , "Int", Property   ; HTTP_SERVER_PROPERTY
    , "Ptr", PropertyInformation   ; void* optional, out
    , "UInt", PropertyInformationLength   ; DWORD
    , "UInt", Reserved1   ; DWORD optional
    , "Ptr", ReturnLength   ; DWORD* optional, out
    , "Ptr", Reserved2   ; void* optional
    , "UInt")   ; return: DWORD
●HttpQueryRequestQueueProperty(RequestQueueHandle, Property, PropertyInformation, PropertyInformationLength, Reserved1, ReturnLength, Reserved2) = DLL("HTTPAPI.dll", "dword HttpQueryRequestQueueProperty(void*, int, void*, dword, dword, void*, void*)")
# 呼び出し: HttpQueryRequestQueueProperty(RequestQueueHandle, Property, PropertyInformation, PropertyInformationLength, Reserved1, ReturnLength, Reserved2)
# RequestQueueHandle : HANDLE -> "void*"
# Property : HTTP_SERVER_PROPERTY -> "int"
# PropertyInformation : void* optional, out -> "void*"
# PropertyInformationLength : DWORD -> "dword"
# Reserved1 : DWORD optional -> "dword"
# ReturnLength : DWORD* optional, out -> "void*"
# Reserved2 : void* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。