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