Win32 API 日本語リファレンス
ホームDevices.AllJoyn › alljoyn_proxybusobject_getinterfaces

alljoyn_proxybusobject_getinterfaces

関数
プロキシバスオブジェクトが実装する全インターフェースを取得する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

// MSAJApi.dll
#include <windows.h>

UINT_PTR alljoyn_proxybusobject_getinterfaces(
    alljoyn_proxybusobject proxyObj,
    const alljoyn_interfacedescription* ifaces,
    UINT_PTR numIfaces
);

パラメーター

名前方向
proxyObjalljoyn_proxybusobjectin
ifacesalljoyn_interfacedescription*in
numIfacesUINT_PTRin

戻り値の型: UINT_PTR

各言語での呼び出し定義

// MSAJApi.dll
#include <windows.h>

UINT_PTR alljoyn_proxybusobject_getinterfaces(
    alljoyn_proxybusobject proxyObj,
    const alljoyn_interfacedescription* ifaces,
    UINT_PTR numIfaces
);
[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern UIntPtr alljoyn_proxybusobject_getinterfaces(
    IntPtr proxyObj,   // alljoyn_proxybusobject
    ref IntPtr ifaces,   // alljoyn_interfacedescription*
    UIntPtr numIfaces   // UINT_PTR
);
<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_proxybusobject_getinterfaces(
    proxyObj As IntPtr,   ' alljoyn_proxybusobject
    ByRef ifaces As IntPtr,   ' alljoyn_interfacedescription*
    numIfaces As UIntPtr   ' UINT_PTR
) As UIntPtr
End Function
' proxyObj : alljoyn_proxybusobject
' ifaces : alljoyn_interfacedescription*
' numIfaces : UINT_PTR
Declare PtrSafe Function alljoyn_proxybusobject_getinterfaces Lib "msajapi" ( _
    ByVal proxyObj 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_proxybusobject_getinterfaces = ctypes.windll.msajapi.alljoyn_proxybusobject_getinterfaces
alljoyn_proxybusobject_getinterfaces.restype = ctypes.c_size_t
alljoyn_proxybusobject_getinterfaces.argtypes = [
    ctypes.c_ssize_t,  # proxyObj : alljoyn_proxybusobject
    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_proxybusobject_getinterfaces = Fiddle::Function.new(
  lib['alljoyn_proxybusobject_getinterfaces'],
  [
    Fiddle::TYPE_INTPTR_T,  # proxyObj : alljoyn_proxybusobject
    Fiddle::TYPE_VOIDP,  # ifaces : alljoyn_interfacedescription*
    Fiddle::TYPE_UINTPTR_T,  # numIfaces : UINT_PTR
  ],
  Fiddle::TYPE_UINTPTR_T)
#[link(name = "msajapi")]
extern "system" {
    fn alljoyn_proxybusobject_getinterfaces(
        proxyObj: isize,  // alljoyn_proxybusobject
        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_proxybusobject_getinterfaces(IntPtr proxyObj, ref IntPtr ifaces, UIntPtr numIfaces);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_proxybusobject_getinterfaces' -Namespace Win32 -PassThru
# $api::alljoyn_proxybusobject_getinterfaces(proxyObj, ifaces, numIfaces)
#uselib "MSAJApi.dll"
#func global alljoyn_proxybusobject_getinterfaces "alljoyn_proxybusobject_getinterfaces" sptr, sptr, sptr
; alljoyn_proxybusobject_getinterfaces proxyObj, ifaces, numIfaces   ; 戻り値は stat
; proxyObj : alljoyn_proxybusobject -> "sptr"
; ifaces : alljoyn_interfacedescription* -> "sptr"
; numIfaces : UINT_PTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MSAJApi.dll"
#cfunc global alljoyn_proxybusobject_getinterfaces "alljoyn_proxybusobject_getinterfaces" sptr, int, sptr
; res = alljoyn_proxybusobject_getinterfaces(proxyObj, ifaces, numIfaces)
; proxyObj : alljoyn_proxybusobject -> "sptr"
; ifaces : alljoyn_interfacedescription* -> "int"
; numIfaces : UINT_PTR -> "sptr"
; UINT_PTR alljoyn_proxybusobject_getinterfaces(alljoyn_proxybusobject proxyObj, alljoyn_interfacedescription* ifaces, UINT_PTR numIfaces)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_proxybusobject_getinterfaces "alljoyn_proxybusobject_getinterfaces" intptr, int, intptr
; res = alljoyn_proxybusobject_getinterfaces(proxyObj, ifaces, numIfaces)
; proxyObj : alljoyn_proxybusobject -> "intptr"
; ifaces : alljoyn_interfacedescription* -> "int"
; numIfaces : UINT_PTR -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_proxybusobject_getinterfaces = msajapi.NewProc("alljoyn_proxybusobject_getinterfaces")
)

// proxyObj (alljoyn_proxybusobject), ifaces (alljoyn_interfacedescription*), numIfaces (UINT_PTR)
r1, _, err := procalljoyn_proxybusobject_getinterfaces.Call(
	uintptr(proxyObj),
	uintptr(ifaces),
	uintptr(numIfaces),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // UINT_PTR
function alljoyn_proxybusobject_getinterfaces(
  proxyObj: NativeInt;   // alljoyn_proxybusobject
  ifaces: Pointer;   // alljoyn_interfacedescription*
  numIfaces: NativeUInt   // UINT_PTR
): NativeUInt; stdcall;
  external 'MSAJApi.dll' name 'alljoyn_proxybusobject_getinterfaces';
result := DllCall("MSAJApi\alljoyn_proxybusobject_getinterfaces"
    , "Ptr", proxyObj   ; alljoyn_proxybusobject
    , "Ptr", ifaces   ; alljoyn_interfacedescription*
    , "UPtr", numIfaces   ; UINT_PTR
    , "UPtr")   ; return: UINT_PTR
●alljoyn_proxybusobject_getinterfaces(proxyObj, ifaces, numIfaces) = DLL("MSAJApi.dll", "int alljoyn_proxybusobject_getinterfaces(int, void*, int)")
# 呼び出し: alljoyn_proxybusobject_getinterfaces(proxyObj, ifaces, numIfaces)
# proxyObj : alljoyn_proxybusobject -> "int"
# ifaces : alljoyn_interfacedescription* -> "void*"
# numIfaces : UINT_PTR -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。