ホーム › Devices.AllJoyn › alljoyn_busobject_getbusattachment
alljoyn_busobject_getbusattachment
関数バスオブジェクトが属するバスアタッチメントを取得する。
シグネチャ
// MSAJApi.dll
#include <windows.h>
alljoyn_busattachment alljoyn_busobject_getbusattachment(
alljoyn_busobject bus
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| bus | alljoyn_busobject | in |
戻り値の型: alljoyn_busattachment
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
alljoyn_busattachment alljoyn_busobject_getbusattachment(
alljoyn_busobject bus
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern IntPtr alljoyn_busobject_getbusattachment(
IntPtr bus // alljoyn_busobject
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_busobject_getbusattachment(
bus As IntPtr ' alljoyn_busobject
) As IntPtr
End Function' bus : alljoyn_busobject
Declare PtrSafe Function alljoyn_busobject_getbusattachment Lib "msajapi" ( _
ByVal bus As LongPtr) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_busobject_getbusattachment = ctypes.windll.msajapi.alljoyn_busobject_getbusattachment
alljoyn_busobject_getbusattachment.restype = ctypes.c_ssize_t
alljoyn_busobject_getbusattachment.argtypes = [
ctypes.c_ssize_t, # bus : alljoyn_busobject
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_busobject_getbusattachment = Fiddle::Function.new(
lib['alljoyn_busobject_getbusattachment'],
[
Fiddle::TYPE_INTPTR_T, # bus : alljoyn_busobject
],
Fiddle::TYPE_INTPTR_T)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_busobject_getbusattachment(
bus: isize // alljoyn_busobject
) -> isize;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern IntPtr alljoyn_busobject_getbusattachment(IntPtr bus);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_busobject_getbusattachment' -Namespace Win32 -PassThru
# $api::alljoyn_busobject_getbusattachment(bus)#uselib "MSAJApi.dll"
#func global alljoyn_busobject_getbusattachment "alljoyn_busobject_getbusattachment" sptr
; alljoyn_busobject_getbusattachment bus ; 戻り値は stat
; bus : alljoyn_busobject -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSAJApi.dll"
#cfunc global alljoyn_busobject_getbusattachment "alljoyn_busobject_getbusattachment" sptr
; res = alljoyn_busobject_getbusattachment(bus)
; bus : alljoyn_busobject -> "sptr"; alljoyn_busattachment alljoyn_busobject_getbusattachment(alljoyn_busobject bus)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_busobject_getbusattachment "alljoyn_busobject_getbusattachment" intptr
; res = alljoyn_busobject_getbusattachment(bus)
; bus : alljoyn_busobject -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_busobject_getbusattachment = msajapi.NewProc("alljoyn_busobject_getbusattachment")
)
// bus (alljoyn_busobject)
r1, _, err := procalljoyn_busobject_getbusattachment.Call(
uintptr(bus),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // alljoyn_busattachmentfunction alljoyn_busobject_getbusattachment(
bus: NativeInt // alljoyn_busobject
): NativeInt; stdcall;
external 'MSAJApi.dll' name 'alljoyn_busobject_getbusattachment';result := DllCall("MSAJApi\alljoyn_busobject_getbusattachment"
, "Ptr", bus ; alljoyn_busobject
, "Ptr") ; return: alljoyn_busattachment●alljoyn_busobject_getbusattachment(bus) = DLL("MSAJApi.dll", "int alljoyn_busobject_getbusattachment(int)")
# 呼び出し: alljoyn_busobject_getbusattachment(bus)
# bus : alljoyn_busobject -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。