ホーム › Devices.Tapi › lineGetProxyStatus
lineGetProxyStatus
関数回線が処理するプロキシ要求の状態一覧を取得する。
シグネチャ
// TAPI32.dll
#include <windows.h>
INT lineGetProxyStatus(
DWORD hLineApp,
DWORD dwDeviceID,
DWORD dwAppAPIVersion,
LINEPROXYREQUESTLIST* lpLineProxyReqestList
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hLineApp | DWORD | in |
| dwDeviceID | DWORD | in |
| dwAppAPIVersion | DWORD | in |
| lpLineProxyReqestList | LINEPROXYREQUESTLIST* | inout |
戻り値の型: INT
各言語での呼び出し定義
// TAPI32.dll
#include <windows.h>
INT lineGetProxyStatus(
DWORD hLineApp,
DWORD dwDeviceID,
DWORD dwAppAPIVersion,
LINEPROXYREQUESTLIST* lpLineProxyReqestList
);[DllImport("TAPI32.dll", ExactSpelling = true)]
static extern int lineGetProxyStatus(
uint hLineApp, // DWORD
uint dwDeviceID, // DWORD
uint dwAppAPIVersion, // DWORD
IntPtr lpLineProxyReqestList // LINEPROXYREQUESTLIST* in/out
);<DllImport("TAPI32.dll", ExactSpelling:=True)>
Public Shared Function lineGetProxyStatus(
hLineApp As UInteger, ' DWORD
dwDeviceID As UInteger, ' DWORD
dwAppAPIVersion As UInteger, ' DWORD
lpLineProxyReqestList As IntPtr ' LINEPROXYREQUESTLIST* in/out
) As Integer
End Function' hLineApp : DWORD
' dwDeviceID : DWORD
' dwAppAPIVersion : DWORD
' lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out
Declare PtrSafe Function lineGetProxyStatus Lib "tapi32" ( _
ByVal hLineApp As Long, _
ByVal dwDeviceID As Long, _
ByVal dwAppAPIVersion As Long, _
ByVal lpLineProxyReqestList As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
lineGetProxyStatus = ctypes.windll.tapi32.lineGetProxyStatus
lineGetProxyStatus.restype = ctypes.c_int
lineGetProxyStatus.argtypes = [
wintypes.DWORD, # hLineApp : DWORD
wintypes.DWORD, # dwDeviceID : DWORD
wintypes.DWORD, # dwAppAPIVersion : DWORD
ctypes.c_void_p, # lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('TAPI32.dll')
lineGetProxyStatus = Fiddle::Function.new(
lib['lineGetProxyStatus'],
[
-Fiddle::TYPE_INT, # hLineApp : DWORD
-Fiddle::TYPE_INT, # dwDeviceID : DWORD
-Fiddle::TYPE_INT, # dwAppAPIVersion : DWORD
Fiddle::TYPE_VOIDP, # lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out
],
Fiddle::TYPE_INT)#[link(name = "tapi32")]
extern "system" {
fn lineGetProxyStatus(
hLineApp: u32, // DWORD
dwDeviceID: u32, // DWORD
dwAppAPIVersion: u32, // DWORD
lpLineProxyReqestList: *mut LINEPROXYREQUESTLIST // LINEPROXYREQUESTLIST* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("TAPI32.dll")]
public static extern int lineGetProxyStatus(uint hLineApp, uint dwDeviceID, uint dwAppAPIVersion, IntPtr lpLineProxyReqestList);
"@
$api = Add-Type -MemberDefinition $sig -Name 'TAPI32_lineGetProxyStatus' -Namespace Win32 -PassThru
# $api::lineGetProxyStatus(hLineApp, dwDeviceID, dwAppAPIVersion, lpLineProxyReqestList)#uselib "TAPI32.dll"
#func global lineGetProxyStatus "lineGetProxyStatus" sptr, sptr, sptr, sptr
; lineGetProxyStatus hLineApp, dwDeviceID, dwAppAPIVersion, varptr(lpLineProxyReqestList) ; 戻り値は stat
; hLineApp : DWORD -> "sptr"
; dwDeviceID : DWORD -> "sptr"
; dwAppAPIVersion : DWORD -> "sptr"
; lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "TAPI32.dll" #cfunc global lineGetProxyStatus "lineGetProxyStatus" int, int, int, var ; res = lineGetProxyStatus(hLineApp, dwDeviceID, dwAppAPIVersion, lpLineProxyReqestList) ; hLineApp : DWORD -> "int" ; dwDeviceID : DWORD -> "int" ; dwAppAPIVersion : DWORD -> "int" ; lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "TAPI32.dll" #cfunc global lineGetProxyStatus "lineGetProxyStatus" int, int, int, sptr ; res = lineGetProxyStatus(hLineApp, dwDeviceID, dwAppAPIVersion, varptr(lpLineProxyReqestList)) ; hLineApp : DWORD -> "int" ; dwDeviceID : DWORD -> "int" ; dwAppAPIVersion : DWORD -> "int" ; lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; INT lineGetProxyStatus(DWORD hLineApp, DWORD dwDeviceID, DWORD dwAppAPIVersion, LINEPROXYREQUESTLIST* lpLineProxyReqestList) #uselib "TAPI32.dll" #cfunc global lineGetProxyStatus "lineGetProxyStatus" int, int, int, var ; res = lineGetProxyStatus(hLineApp, dwDeviceID, dwAppAPIVersion, lpLineProxyReqestList) ; hLineApp : DWORD -> "int" ; dwDeviceID : DWORD -> "int" ; dwAppAPIVersion : DWORD -> "int" ; lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; INT lineGetProxyStatus(DWORD hLineApp, DWORD dwDeviceID, DWORD dwAppAPIVersion, LINEPROXYREQUESTLIST* lpLineProxyReqestList) #uselib "TAPI32.dll" #cfunc global lineGetProxyStatus "lineGetProxyStatus" int, int, int, intptr ; res = lineGetProxyStatus(hLineApp, dwDeviceID, dwAppAPIVersion, varptr(lpLineProxyReqestList)) ; hLineApp : DWORD -> "int" ; dwDeviceID : DWORD -> "int" ; dwAppAPIVersion : DWORD -> "int" ; lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
tapi32 = windows.NewLazySystemDLL("TAPI32.dll")
proclineGetProxyStatus = tapi32.NewProc("lineGetProxyStatus")
)
// hLineApp (DWORD), dwDeviceID (DWORD), dwAppAPIVersion (DWORD), lpLineProxyReqestList (LINEPROXYREQUESTLIST* in/out)
r1, _, err := proclineGetProxyStatus.Call(
uintptr(hLineApp),
uintptr(dwDeviceID),
uintptr(dwAppAPIVersion),
uintptr(lpLineProxyReqestList),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction lineGetProxyStatus(
hLineApp: DWORD; // DWORD
dwDeviceID: DWORD; // DWORD
dwAppAPIVersion: DWORD; // DWORD
lpLineProxyReqestList: Pointer // LINEPROXYREQUESTLIST* in/out
): Integer; stdcall;
external 'TAPI32.dll' name 'lineGetProxyStatus';result := DllCall("TAPI32\lineGetProxyStatus"
, "UInt", hLineApp ; DWORD
, "UInt", dwDeviceID ; DWORD
, "UInt", dwAppAPIVersion ; DWORD
, "Ptr", lpLineProxyReqestList ; LINEPROXYREQUESTLIST* in/out
, "Int") ; return: INT●lineGetProxyStatus(hLineApp, dwDeviceID, dwAppAPIVersion, lpLineProxyReqestList) = DLL("TAPI32.dll", "int lineGetProxyStatus(dword, dword, dword, void*)")
# 呼び出し: lineGetProxyStatus(hLineApp, dwDeviceID, dwAppAPIVersion, lpLineProxyReqestList)
# hLineApp : DWORD -> "dword"
# dwDeviceID : DWORD -> "dword"
# dwAppAPIVersion : DWORD -> "dword"
# lpLineProxyReqestList : LINEPROXYREQUESTLIST* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。