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