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