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