ホーム › System.Iis › GetExtensionVersion
GetExtensionVersion
関数ISAPI拡張モジュールのバージョン情報を取得する。
シグネチャ
// RpcProxy.dll
#include <windows.h>
BOOL GetExtensionVersion(
HSE_VERSION_INFO* pVer
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pVer | HSE_VERSION_INFO* | out |
戻り値の型: BOOL
各言語での呼び出し定義
// RpcProxy.dll
#include <windows.h>
BOOL GetExtensionVersion(
HSE_VERSION_INFO* pVer
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("RpcProxy.dll", ExactSpelling = true)]
static extern bool GetExtensionVersion(
IntPtr pVer // HSE_VERSION_INFO* out
);<DllImport("RpcProxy.dll", ExactSpelling:=True)>
Public Shared Function GetExtensionVersion(
pVer As IntPtr ' HSE_VERSION_INFO* out
) As Boolean
End Function' pVer : HSE_VERSION_INFO* out
Declare PtrSafe Function GetExtensionVersion Lib "rpcproxy" ( _
ByVal pVer As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GetExtensionVersion = ctypes.windll.rpcproxy.GetExtensionVersion
GetExtensionVersion.restype = wintypes.BOOL
GetExtensionVersion.argtypes = [
ctypes.c_void_p, # pVer : HSE_VERSION_INFO* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RpcProxy.dll')
GetExtensionVersion = Fiddle::Function.new(
lib['GetExtensionVersion'],
[
Fiddle::TYPE_VOIDP, # pVer : HSE_VERSION_INFO* out
],
Fiddle::TYPE_INT)#[link(name = "rpcproxy")]
extern "system" {
fn GetExtensionVersion(
pVer: *mut HSE_VERSION_INFO // HSE_VERSION_INFO* out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("RpcProxy.dll")]
public static extern bool GetExtensionVersion(IntPtr pVer);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RpcProxy_GetExtensionVersion' -Namespace Win32 -PassThru
# $api::GetExtensionVersion(pVer)#uselib "RpcProxy.dll"
#func global GetExtensionVersion "GetExtensionVersion" sptr
; GetExtensionVersion varptr(pVer) ; 戻り値は stat
; pVer : HSE_VERSION_INFO* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "RpcProxy.dll" #cfunc global GetExtensionVersion "GetExtensionVersion" var ; res = GetExtensionVersion(pVer) ; pVer : HSE_VERSION_INFO* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "RpcProxy.dll" #cfunc global GetExtensionVersion "GetExtensionVersion" sptr ; res = GetExtensionVersion(varptr(pVer)) ; pVer : HSE_VERSION_INFO* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; BOOL GetExtensionVersion(HSE_VERSION_INFO* pVer) #uselib "RpcProxy.dll" #cfunc global GetExtensionVersion "GetExtensionVersion" var ; res = GetExtensionVersion(pVer) ; pVer : HSE_VERSION_INFO* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOL GetExtensionVersion(HSE_VERSION_INFO* pVer) #uselib "RpcProxy.dll" #cfunc global GetExtensionVersion "GetExtensionVersion" intptr ; res = GetExtensionVersion(varptr(pVer)) ; pVer : HSE_VERSION_INFO* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcproxy = windows.NewLazySystemDLL("RpcProxy.dll")
procGetExtensionVersion = rpcproxy.NewProc("GetExtensionVersion")
)
// pVer (HSE_VERSION_INFO* out)
r1, _, err := procGetExtensionVersion.Call(
uintptr(pVer),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction GetExtensionVersion(
pVer: Pointer // HSE_VERSION_INFO* out
): BOOL; stdcall;
external 'RpcProxy.dll' name 'GetExtensionVersion';result := DllCall("RpcProxy\GetExtensionVersion"
, "Ptr", pVer ; HSE_VERSION_INFO* out
, "Int") ; return: BOOL●GetExtensionVersion(pVer) = DLL("RpcProxy.dll", "bool GetExtensionVersion(void*)")
# 呼び出し: GetExtensionVersion(pVer)
# pVer : HSE_VERSION_INFO* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。