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