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