ホーム › Devices.AllJoyn › AllJoynCloseBusHandle
AllJoynCloseBusHandle
関数AllJoynのバスハンドルを閉じる。
シグネチャ
// MSAJApi.dll
#include <windows.h>
BOOL AllJoynCloseBusHandle(
HANDLE busHandle
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| busHandle | HANDLE | in | クローズ対象のバスハンドル。 |
戻り値の型: BOOL
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
BOOL AllJoynCloseBusHandle(
HANDLE busHandle
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MSAJApi.dll", SetLastError = true, ExactSpelling = true)]
static extern bool AllJoynCloseBusHandle(
IntPtr busHandle // HANDLE
);<DllImport("MSAJApi.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function AllJoynCloseBusHandle(
busHandle As IntPtr ' HANDLE
) As Boolean
End Function' busHandle : HANDLE
Declare PtrSafe Function AllJoynCloseBusHandle Lib "msajapi" ( _
ByVal busHandle As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
AllJoynCloseBusHandle = ctypes.windll.msajapi.AllJoynCloseBusHandle
AllJoynCloseBusHandle.restype = wintypes.BOOL
AllJoynCloseBusHandle.argtypes = [
wintypes.HANDLE, # busHandle : HANDLE
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
AllJoynCloseBusHandle = Fiddle::Function.new(
lib['AllJoynCloseBusHandle'],
[
Fiddle::TYPE_VOIDP, # busHandle : HANDLE
],
Fiddle::TYPE_INT)#[link(name = "msajapi")]
extern "system" {
fn AllJoynCloseBusHandle(
busHandle: *mut core::ffi::c_void // HANDLE
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MSAJApi.dll", SetLastError = true)]
public static extern bool AllJoynCloseBusHandle(IntPtr busHandle);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_AllJoynCloseBusHandle' -Namespace Win32 -PassThru
# $api::AllJoynCloseBusHandle(busHandle)#uselib "MSAJApi.dll"
#func global AllJoynCloseBusHandle "AllJoynCloseBusHandle" sptr
; AllJoynCloseBusHandle busHandle ; 戻り値は stat
; busHandle : HANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSAJApi.dll"
#cfunc global AllJoynCloseBusHandle "AllJoynCloseBusHandle" sptr
; res = AllJoynCloseBusHandle(busHandle)
; busHandle : HANDLE -> "sptr"; BOOL AllJoynCloseBusHandle(HANDLE busHandle)
#uselib "MSAJApi.dll"
#cfunc global AllJoynCloseBusHandle "AllJoynCloseBusHandle" intptr
; res = AllJoynCloseBusHandle(busHandle)
; busHandle : HANDLE -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procAllJoynCloseBusHandle = msajapi.NewProc("AllJoynCloseBusHandle")
)
// busHandle (HANDLE)
r1, _, err := procAllJoynCloseBusHandle.Call(
uintptr(busHandle),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction AllJoynCloseBusHandle(
busHandle: THandle // HANDLE
): BOOL; stdcall;
external 'MSAJApi.dll' name 'AllJoynCloseBusHandle';result := DllCall("MSAJApi\AllJoynCloseBusHandle"
, "Ptr", busHandle ; HANDLE
, "Int") ; return: BOOL●AllJoynCloseBusHandle(busHandle) = DLL("MSAJApi.dll", "bool AllJoynCloseBusHandle(void*)")
# 呼び出し: AllJoynCloseBusHandle(busHandle)
# busHandle : HANDLE -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。