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

lineBlindTransferA

関数
通話を指定アドレスへ無条件転送する(ANSI版)。
DLLTAPI32.dll文字セットANSI (-A)呼出規約winapi

シグネチャ

// TAPI32.dll  (ANSI / -A)
#include <windows.h>

INT lineBlindTransferA(
    DWORD hCall,
    LPCSTR lpszDestAddress,
    DWORD dwCountryCode
);

パラメーター

名前方向
hCallDWORDin
lpszDestAddressLPCSTRin
dwCountryCodeDWORDin

戻り値の型: INT

各言語での呼び出し定義

// TAPI32.dll  (ANSI / -A)
#include <windows.h>

INT lineBlindTransferA(
    DWORD hCall,
    LPCSTR lpszDestAddress,
    DWORD dwCountryCode
);
[DllImport("TAPI32.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern int lineBlindTransferA(
    uint hCall,   // DWORD
    [MarshalAs(UnmanagedType.LPStr)] string lpszDestAddress,   // LPCSTR
    uint dwCountryCode   // DWORD
);
<DllImport("TAPI32.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function lineBlindTransferA(
    hCall As UInteger,   ' DWORD
    <MarshalAs(UnmanagedType.LPStr)> lpszDestAddress As String,   ' LPCSTR
    dwCountryCode As UInteger   ' DWORD
) As Integer
End Function
' hCall : DWORD
' lpszDestAddress : LPCSTR
' dwCountryCode : DWORD
Declare PtrSafe Function lineBlindTransferA Lib "tapi32" ( _
    ByVal hCall As Long, _
    ByVal lpszDestAddress As String, _
    ByVal dwCountryCode As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

lineBlindTransferA = ctypes.windll.tapi32.lineBlindTransferA
lineBlindTransferA.restype = ctypes.c_int
lineBlindTransferA.argtypes = [
    wintypes.DWORD,  # hCall : DWORD
    wintypes.LPCSTR,  # lpszDestAddress : LPCSTR
    wintypes.DWORD,  # dwCountryCode : DWORD
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('TAPI32.dll')
lineBlindTransferA = Fiddle::Function.new(
  lib['lineBlindTransferA'],
  [
    -Fiddle::TYPE_INT,  # hCall : DWORD
    Fiddle::TYPE_VOIDP,  # lpszDestAddress : LPCSTR
    -Fiddle::TYPE_INT,  # dwCountryCode : DWORD
  ],
  Fiddle::TYPE_INT)
#[link(name = "tapi32")]
extern "system" {
    fn lineBlindTransferA(
        hCall: u32,  // DWORD
        lpszDestAddress: *const u8,  // LPCSTR
        dwCountryCode: u32  // DWORD
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("TAPI32.dll", CharSet = CharSet.Ansi)]
public static extern int lineBlindTransferA(uint hCall, [MarshalAs(UnmanagedType.LPStr)] string lpszDestAddress, uint dwCountryCode);
"@
$api = Add-Type -MemberDefinition $sig -Name 'TAPI32_lineBlindTransferA' -Namespace Win32 -PassThru
# $api::lineBlindTransferA(hCall, lpszDestAddress, dwCountryCode)
#uselib "TAPI32.dll"
#func global lineBlindTransferA "lineBlindTransferA" sptr, sptr, sptr
; lineBlindTransferA hCall, lpszDestAddress, dwCountryCode   ; 戻り値は stat
; hCall : DWORD -> "sptr"
; lpszDestAddress : LPCSTR -> "sptr"
; dwCountryCode : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "TAPI32.dll"
#cfunc global lineBlindTransferA "lineBlindTransferA" int, str, int
; res = lineBlindTransferA(hCall, lpszDestAddress, dwCountryCode)
; hCall : DWORD -> "int"
; lpszDestAddress : LPCSTR -> "str"
; dwCountryCode : DWORD -> "int"
; INT lineBlindTransferA(DWORD hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
#uselib "TAPI32.dll"
#cfunc global lineBlindTransferA "lineBlindTransferA" int, str, int
; res = lineBlindTransferA(hCall, lpszDestAddress, dwCountryCode)
; hCall : DWORD -> "int"
; lpszDestAddress : LPCSTR -> "str"
; dwCountryCode : DWORD -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	tapi32 = windows.NewLazySystemDLL("TAPI32.dll")
	proclineBlindTransferA = tapi32.NewProc("lineBlindTransferA")
)

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