ホーム › Devices.Tapi › lineBlindTransferW
lineBlindTransferW
関数通話を指定アドレスへ無条件転送する(Unicode版)。
シグネチャ
// TAPI32.dll (Unicode / -W)
#include <windows.h>
INT lineBlindTransferW(
DWORD hCall,
LPCWSTR lpszDestAddressW,
DWORD dwCountryCode
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hCall | DWORD | in |
| lpszDestAddressW | LPCWSTR | in |
| dwCountryCode | DWORD | in |
戻り値の型: INT
各言語での呼び出し定義
// TAPI32.dll (Unicode / -W)
#include <windows.h>
INT lineBlindTransferW(
DWORD hCall,
LPCWSTR lpszDestAddressW,
DWORD dwCountryCode
);[DllImport("TAPI32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int lineBlindTransferW(
uint hCall, // DWORD
[MarshalAs(UnmanagedType.LPWStr)] string lpszDestAddressW, // LPCWSTR
uint dwCountryCode // DWORD
);<DllImport("TAPI32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function lineBlindTransferW(
hCall As UInteger, ' DWORD
<MarshalAs(UnmanagedType.LPWStr)> lpszDestAddressW As String, ' LPCWSTR
dwCountryCode As UInteger ' DWORD
) As Integer
End Function' hCall : DWORD
' lpszDestAddressW : LPCWSTR
' dwCountryCode : DWORD
Declare PtrSafe Function lineBlindTransferW Lib "tapi32" ( _
ByVal hCall As Long, _
ByVal lpszDestAddressW As LongPtr, _
ByVal dwCountryCode As Long) 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
lineBlindTransferW = ctypes.windll.tapi32.lineBlindTransferW
lineBlindTransferW.restype = ctypes.c_int
lineBlindTransferW.argtypes = [
wintypes.DWORD, # hCall : DWORD
wintypes.LPCWSTR, # lpszDestAddressW : LPCWSTR
wintypes.DWORD, # dwCountryCode : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('TAPI32.dll')
lineBlindTransferW = Fiddle::Function.new(
lib['lineBlindTransferW'],
[
-Fiddle::TYPE_INT, # hCall : DWORD
Fiddle::TYPE_VOIDP, # lpszDestAddressW : LPCWSTR
-Fiddle::TYPE_INT, # dwCountryCode : DWORD
],
Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "tapi32")]
extern "system" {
fn lineBlindTransferW(
hCall: u32, // DWORD
lpszDestAddressW: *const u16, // LPCWSTR
dwCountryCode: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("TAPI32.dll", CharSet = CharSet.Unicode)]
public static extern int lineBlindTransferW(uint hCall, [MarshalAs(UnmanagedType.LPWStr)] string lpszDestAddressW, uint dwCountryCode);
"@
$api = Add-Type -MemberDefinition $sig -Name 'TAPI32_lineBlindTransferW' -Namespace Win32 -PassThru
# $api::lineBlindTransferW(hCall, lpszDestAddressW, dwCountryCode)#uselib "TAPI32.dll"
#func global lineBlindTransferW "lineBlindTransferW" wptr, wptr, wptr
; lineBlindTransferW hCall, lpszDestAddressW, dwCountryCode ; 戻り値は stat
; hCall : DWORD -> "wptr"
; lpszDestAddressW : LPCWSTR -> "wptr"
; dwCountryCode : DWORD -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "TAPI32.dll"
#cfunc global lineBlindTransferW "lineBlindTransferW" int, wstr, int
; res = lineBlindTransferW(hCall, lpszDestAddressW, dwCountryCode)
; hCall : DWORD -> "int"
; lpszDestAddressW : LPCWSTR -> "wstr"
; dwCountryCode : DWORD -> "int"; INT lineBlindTransferW(DWORD hCall, LPCWSTR lpszDestAddressW, DWORD dwCountryCode)
#uselib "TAPI32.dll"
#cfunc global lineBlindTransferW "lineBlindTransferW" int, wstr, int
; res = lineBlindTransferW(hCall, lpszDestAddressW, dwCountryCode)
; hCall : DWORD -> "int"
; lpszDestAddressW : LPCWSTR -> "wstr"
; dwCountryCode : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
tapi32 = windows.NewLazySystemDLL("TAPI32.dll")
proclineBlindTransferW = tapi32.NewProc("lineBlindTransferW")
)
// hCall (DWORD), lpszDestAddressW (LPCWSTR), dwCountryCode (DWORD)
r1, _, err := proclineBlindTransferW.Call(
uintptr(hCall),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(lpszDestAddressW))),
uintptr(dwCountryCode),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction lineBlindTransferW(
hCall: DWORD; // DWORD
lpszDestAddressW: PWideChar; // LPCWSTR
dwCountryCode: DWORD // DWORD
): Integer; stdcall;
external 'TAPI32.dll' name 'lineBlindTransferW';result := DllCall("TAPI32\lineBlindTransferW"
, "UInt", hCall ; DWORD
, "WStr", lpszDestAddressW ; LPCWSTR
, "UInt", dwCountryCode ; DWORD
, "Int") ; return: INT●lineBlindTransferW(hCall, lpszDestAddressW, dwCountryCode) = DLL("TAPI32.dll", "int lineBlindTransferW(dword, char*, dword)")
# 呼び出し: lineBlindTransferW(hCall, lpszDestAddressW, dwCountryCode)
# hCall : DWORD -> "dword"
# lpszDestAddressW : LPCWSTR -> "char*"
# dwCountryCode : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。