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