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

lineGetCallInfoW

関数
指定した通話の固定的な情報を取得する(Unicode版)。
DLLTAPI32.dll文字セットUnicode (-W)呼出規約winapi

シグネチャ

// TAPI32.dll  (Unicode / -W)
#include <windows.h>

INT lineGetCallInfoW(
    DWORD hCall,
    LINECALLINFO* lpCallInfo
);

パラメーター

名前方向
hCallDWORDin
lpCallInfoLINECALLINFO*inout

戻り値の型: INT

各言語での呼び出し定義

// TAPI32.dll  (Unicode / -W)
#include <windows.h>

INT lineGetCallInfoW(
    DWORD hCall,
    LINECALLINFO* lpCallInfo
);
[DllImport("TAPI32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int lineGetCallInfoW(
    uint hCall,   // DWORD
    IntPtr lpCallInfo   // LINECALLINFO* in/out
);
<DllImport("TAPI32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function lineGetCallInfoW(
    hCall As UInteger,   ' DWORD
    lpCallInfo As IntPtr   ' LINECALLINFO* in/out
) As Integer
End Function
' hCall : DWORD
' lpCallInfo : LINECALLINFO* in/out
Declare PtrSafe Function lineGetCallInfoW Lib "tapi32" ( _
    ByVal hCall As Long, _
    ByVal lpCallInfo As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

lineGetCallInfoW = ctypes.windll.tapi32.lineGetCallInfoW
lineGetCallInfoW.restype = ctypes.c_int
lineGetCallInfoW.argtypes = [
    wintypes.DWORD,  # hCall : DWORD
    ctypes.c_void_p,  # lpCallInfo : LINECALLINFO* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	tapi32 = windows.NewLazySystemDLL("TAPI32.dll")
	proclineGetCallInfoW = tapi32.NewProc("lineGetCallInfoW")
)

// hCall (DWORD), lpCallInfo (LINECALLINFO* in/out)
r1, _, err := proclineGetCallInfoW.Call(
	uintptr(hCall),
	uintptr(lpCallInfo),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // INT
function lineGetCallInfoW(
  hCall: DWORD;   // DWORD
  lpCallInfo: Pointer   // LINECALLINFO* in/out
): Integer; stdcall;
  external 'TAPI32.dll' name 'lineGetCallInfoW';
result := DllCall("TAPI32\lineGetCallInfoW"
    , "UInt", hCall   ; DWORD
    , "Ptr", lpCallInfo   ; LINECALLINFO* in/out
    , "Int")   ; return: INT
●lineGetCallInfoW(hCall, lpCallInfo) = DLL("TAPI32.dll", "int lineGetCallInfoW(dword, void*)")
# 呼び出し: lineGetCallInfoW(hCall, lpCallInfo)
# hCall : DWORD -> "dword"
# lpCallInfo : LINECALLINFO* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。