ホーム › Networking.HttpServer › HttpSetUrlGroupProperty
HttpSetUrlGroupProperty
関数URLグループのプロパティを設定する。
シグネチャ
// HTTPAPI.dll
#include <windows.h>
DWORD HttpSetUrlGroupProperty(
ULONGLONG UrlGroupId,
HTTP_SERVER_PROPERTY Property,
void* PropertyInformation,
DWORD PropertyInformationLength
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| UrlGroupId | ULONGLONG | in |
| Property | HTTP_SERVER_PROPERTY | in |
| PropertyInformation | void* | in |
| PropertyInformationLength | DWORD | in |
戻り値の型: DWORD
各言語での呼び出し定義
// HTTPAPI.dll
#include <windows.h>
DWORD HttpSetUrlGroupProperty(
ULONGLONG UrlGroupId,
HTTP_SERVER_PROPERTY Property,
void* PropertyInformation,
DWORD PropertyInformationLength
);[DllImport("HTTPAPI.dll", ExactSpelling = true)]
static extern uint HttpSetUrlGroupProperty(
ulong UrlGroupId, // ULONGLONG
int Property, // HTTP_SERVER_PROPERTY
IntPtr PropertyInformation, // void*
uint PropertyInformationLength // DWORD
);<DllImport("HTTPAPI.dll", ExactSpelling:=True)>
Public Shared Function HttpSetUrlGroupProperty(
UrlGroupId As ULong, ' ULONGLONG
[Property] As Integer, ' HTTP_SERVER_PROPERTY
PropertyInformation As IntPtr, ' void*
PropertyInformationLength As UInteger ' DWORD
) As UInteger
End Function' UrlGroupId : ULONGLONG
' Property : HTTP_SERVER_PROPERTY
' PropertyInformation : void*
' PropertyInformationLength : DWORD
Declare PtrSafe Function HttpSetUrlGroupProperty Lib "httpapi" ( _
ByVal UrlGroupId As LongLong, _
ByVal Property As Long, _
ByVal PropertyInformation As LongPtr, _
ByVal PropertyInformationLength As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
HttpSetUrlGroupProperty = ctypes.windll.httpapi.HttpSetUrlGroupProperty
HttpSetUrlGroupProperty.restype = wintypes.DWORD
HttpSetUrlGroupProperty.argtypes = [
ctypes.c_ulonglong, # UrlGroupId : ULONGLONG
ctypes.c_int, # Property : HTTP_SERVER_PROPERTY
ctypes.POINTER(None), # PropertyInformation : void*
wintypes.DWORD, # PropertyInformationLength : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('HTTPAPI.dll')
HttpSetUrlGroupProperty = Fiddle::Function.new(
lib['HttpSetUrlGroupProperty'],
[
-Fiddle::TYPE_LONG_LONG, # UrlGroupId : ULONGLONG
Fiddle::TYPE_INT, # Property : HTTP_SERVER_PROPERTY
Fiddle::TYPE_VOIDP, # PropertyInformation : void*
-Fiddle::TYPE_INT, # PropertyInformationLength : DWORD
],
-Fiddle::TYPE_INT)#[link(name = "httpapi")]
extern "system" {
fn HttpSetUrlGroupProperty(
UrlGroupId: u64, // ULONGLONG
Property: i32, // HTTP_SERVER_PROPERTY
PropertyInformation: *mut (), // void*
PropertyInformationLength: u32 // DWORD
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("HTTPAPI.dll")]
public static extern uint HttpSetUrlGroupProperty(ulong UrlGroupId, int Property, IntPtr PropertyInformation, uint PropertyInformationLength);
"@
$api = Add-Type -MemberDefinition $sig -Name 'HTTPAPI_HttpSetUrlGroupProperty' -Namespace Win32 -PassThru
# $api::HttpSetUrlGroupProperty(UrlGroupId, Property, PropertyInformation, PropertyInformationLength)#uselib "HTTPAPI.dll"
#func global HttpSetUrlGroupProperty "HttpSetUrlGroupProperty" sptr, sptr, sptr, sptr
; HttpSetUrlGroupProperty UrlGroupId, Property, PropertyInformation, PropertyInformationLength ; 戻り値は stat
; UrlGroupId : ULONGLONG -> "sptr"
; Property : HTTP_SERVER_PROPERTY -> "sptr"
; PropertyInformation : void* -> "sptr"
; PropertyInformationLength : DWORD -> "sptr"
; ※HSP3.7は int64 引数(64bit値渡し)に非対応です。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "HTTPAPI.dll"
#cfunc global HttpSetUrlGroupProperty "HttpSetUrlGroupProperty" int64, int, sptr, int
; res = HttpSetUrlGroupProperty(UrlGroupId, Property, PropertyInformation, PropertyInformationLength)
; UrlGroupId : ULONGLONG -> "int64"
; Property : HTTP_SERVER_PROPERTY -> "int"
; PropertyInformation : void* -> "sptr"
; PropertyInformationLength : DWORD -> "int"
; ※int64 引数の DLL 値渡しは x64 ランタイム(hsp3_64)のみ対応(x86 は未対応)。; DWORD HttpSetUrlGroupProperty(ULONGLONG UrlGroupId, HTTP_SERVER_PROPERTY Property, void* PropertyInformation, DWORD PropertyInformationLength)
#uselib "HTTPAPI.dll"
#cfunc global HttpSetUrlGroupProperty "HttpSetUrlGroupProperty" int64, int, intptr, int
; res = HttpSetUrlGroupProperty(UrlGroupId, Property, PropertyInformation, PropertyInformationLength)
; UrlGroupId : ULONGLONG -> "int64"
; Property : HTTP_SERVER_PROPERTY -> "int"
; PropertyInformation : void* -> "intptr"
; PropertyInformationLength : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
httpapi = windows.NewLazySystemDLL("HTTPAPI.dll")
procHttpSetUrlGroupProperty = httpapi.NewProc("HttpSetUrlGroupProperty")
)
// UrlGroupId (ULONGLONG), Property (HTTP_SERVER_PROPERTY), PropertyInformation (void*), PropertyInformationLength (DWORD)
r1, _, err := procHttpSetUrlGroupProperty.Call(
uintptr(UrlGroupId),
uintptr(Property),
uintptr(PropertyInformation),
uintptr(PropertyInformationLength),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction HttpSetUrlGroupProperty(
UrlGroupId: UInt64; // ULONGLONG
Property: Integer; // HTTP_SERVER_PROPERTY
PropertyInformation: Pointer; // void*
PropertyInformationLength: DWORD // DWORD
): DWORD; stdcall;
external 'HTTPAPI.dll' name 'HttpSetUrlGroupProperty';result := DllCall("HTTPAPI\HttpSetUrlGroupProperty"
, "Int64", UrlGroupId ; ULONGLONG
, "Int", Property ; HTTP_SERVER_PROPERTY
, "Ptr", PropertyInformation ; void*
, "UInt", PropertyInformationLength ; DWORD
, "UInt") ; return: DWORD●HttpSetUrlGroupProperty(UrlGroupId, Property, PropertyInformation, PropertyInformationLength) = DLL("HTTPAPI.dll", "dword HttpSetUrlGroupProperty(qword, int, void*, dword)")
# 呼び出し: HttpSetUrlGroupProperty(UrlGroupId, Property, PropertyInformation, PropertyInformationLength)
# UrlGroupId : ULONGLONG -> "qword"
# Property : HTTP_SERVER_PROPERTY -> "int"
# PropertyInformation : void* -> "void*"
# PropertyInformationLength : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。