Win32 API 日本語リファレンス
ホームDevices.Tapi › lineCompleteCall

lineCompleteCall

関数
話中や応答なしの通話に対し完了処理を指定して実行する。
DLLTAPI32.dll呼出規約winapi

シグネチャ

// TAPI32.dll
#include <windows.h>

INT lineCompleteCall(
    DWORD hCall,
    DWORD* lpdwCompletionID,
    DWORD dwCompletionMode,
    DWORD dwMessageID
);

パラメーター

名前方向
hCallDWORDin
lpdwCompletionIDDWORD*inout
dwCompletionModeDWORDin
dwMessageIDDWORDin

戻り値の型: INT

各言語での呼び出し定義

// TAPI32.dll
#include <windows.h>

INT lineCompleteCall(
    DWORD hCall,
    DWORD* lpdwCompletionID,
    DWORD dwCompletionMode,
    DWORD dwMessageID
);
[DllImport("TAPI32.dll", ExactSpelling = true)]
static extern int lineCompleteCall(
    uint hCall,   // DWORD
    ref uint lpdwCompletionID,   // DWORD* in/out
    uint dwCompletionMode,   // DWORD
    uint dwMessageID   // DWORD
);
<DllImport("TAPI32.dll", ExactSpelling:=True)>
Public Shared Function lineCompleteCall(
    hCall As UInteger,   ' DWORD
    ByRef lpdwCompletionID As UInteger,   ' DWORD* in/out
    dwCompletionMode As UInteger,   ' DWORD
    dwMessageID As UInteger   ' DWORD
) As Integer
End Function
' hCall : DWORD
' lpdwCompletionID : DWORD* in/out
' dwCompletionMode : DWORD
' dwMessageID : DWORD
Declare PtrSafe Function lineCompleteCall Lib "tapi32" ( _
    ByVal hCall As Long, _
    ByRef lpdwCompletionID As Long, _
    ByVal dwCompletionMode As Long, _
    ByVal dwMessageID As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

lineCompleteCall = ctypes.windll.tapi32.lineCompleteCall
lineCompleteCall.restype = ctypes.c_int
lineCompleteCall.argtypes = [
    wintypes.DWORD,  # hCall : DWORD
    ctypes.POINTER(wintypes.DWORD),  # lpdwCompletionID : DWORD* in/out
    wintypes.DWORD,  # dwCompletionMode : DWORD
    wintypes.DWORD,  # dwMessageID : DWORD
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('TAPI32.dll')
lineCompleteCall = Fiddle::Function.new(
  lib['lineCompleteCall'],
  [
    -Fiddle::TYPE_INT,  # hCall : DWORD
    Fiddle::TYPE_VOIDP,  # lpdwCompletionID : DWORD* in/out
    -Fiddle::TYPE_INT,  # dwCompletionMode : DWORD
    -Fiddle::TYPE_INT,  # dwMessageID : DWORD
  ],
  Fiddle::TYPE_INT)
#[link(name = "tapi32")]
extern "system" {
    fn lineCompleteCall(
        hCall: u32,  // DWORD
        lpdwCompletionID: *mut u32,  // DWORD* in/out
        dwCompletionMode: u32,  // DWORD
        dwMessageID: u32  // DWORD
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("TAPI32.dll")]
public static extern int lineCompleteCall(uint hCall, ref uint lpdwCompletionID, uint dwCompletionMode, uint dwMessageID);
"@
$api = Add-Type -MemberDefinition $sig -Name 'TAPI32_lineCompleteCall' -Namespace Win32 -PassThru
# $api::lineCompleteCall(hCall, lpdwCompletionID, dwCompletionMode, dwMessageID)
#uselib "TAPI32.dll"
#func global lineCompleteCall "lineCompleteCall" sptr, sptr, sptr, sptr
; lineCompleteCall hCall, varptr(lpdwCompletionID), dwCompletionMode, dwMessageID   ; 戻り値は stat
; hCall : DWORD -> "sptr"
; lpdwCompletionID : DWORD* in/out -> "sptr"
; dwCompletionMode : DWORD -> "sptr"
; dwMessageID : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "TAPI32.dll"
#cfunc global lineCompleteCall "lineCompleteCall" int, var, int, int
; res = lineCompleteCall(hCall, lpdwCompletionID, dwCompletionMode, dwMessageID)
; hCall : DWORD -> "int"
; lpdwCompletionID : DWORD* in/out -> "var"
; dwCompletionMode : DWORD -> "int"
; dwMessageID : DWORD -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; INT lineCompleteCall(DWORD hCall, DWORD* lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID)
#uselib "TAPI32.dll"
#cfunc global lineCompleteCall "lineCompleteCall" int, var, int, int
; res = lineCompleteCall(hCall, lpdwCompletionID, dwCompletionMode, dwMessageID)
; hCall : DWORD -> "int"
; lpdwCompletionID : DWORD* in/out -> "var"
; dwCompletionMode : DWORD -> "int"
; dwMessageID : DWORD -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	tapi32 = windows.NewLazySystemDLL("TAPI32.dll")
	proclineCompleteCall = tapi32.NewProc("lineCompleteCall")
)

// hCall (DWORD), lpdwCompletionID (DWORD* in/out), dwCompletionMode (DWORD), dwMessageID (DWORD)
r1, _, err := proclineCompleteCall.Call(
	uintptr(hCall),
	uintptr(lpdwCompletionID),
	uintptr(dwCompletionMode),
	uintptr(dwMessageID),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // INT
function lineCompleteCall(
  hCall: DWORD;   // DWORD
  lpdwCompletionID: Pointer;   // DWORD* in/out
  dwCompletionMode: DWORD;   // DWORD
  dwMessageID: DWORD   // DWORD
): Integer; stdcall;
  external 'TAPI32.dll' name 'lineCompleteCall';
result := DllCall("TAPI32\lineCompleteCall"
    , "UInt", hCall   ; DWORD
    , "Ptr", lpdwCompletionID   ; DWORD* in/out
    , "UInt", dwCompletionMode   ; DWORD
    , "UInt", dwMessageID   ; DWORD
    , "Int")   ; return: INT
●lineCompleteCall(hCall, lpdwCompletionID, dwCompletionMode, dwMessageID) = DLL("TAPI32.dll", "int lineCompleteCall(dword, void*, dword, dword)")
# 呼び出し: lineCompleteCall(hCall, lpdwCompletionID, dwCompletionMode, dwMessageID)
# hCall : DWORD -> "dword"
# lpdwCompletionID : DWORD* in/out -> "void*"
# dwCompletionMode : DWORD -> "dword"
# dwMessageID : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。