ホーム › Devices.AllJoyn › alljoyn_proxybusobject_getpropertyasync
alljoyn_proxybusobject_getpropertyasync
関数リモートオブジェクトのプロパティ値を非同期で取得する。
シグネチャ
// MSAJApi.dll
#include <windows.h>
QStatus alljoyn_proxybusobject_getpropertyasync(
alljoyn_proxybusobject proxyObj,
LPCSTR iface,
LPCSTR property,
alljoyn_proxybusobject_listener_getpropertycb_ptr callback,
DWORD timeout,
void* context
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| proxyObj | alljoyn_proxybusobject | in | プロパティを非同期取得する対象のプロキシバスオブジェクトハンドル。 |
| iface | LPCSTR | in | プロパティが属するインターフェース名を指すNULL終端文字列。 |
| property | LPCSTR | in | 取得するプロパティの名前を指すNULL終端文字列。 |
| callback | alljoyn_proxybusobject_listener_getpropertycb_ptr | in | 取得完了時に呼ばれるコールバック関数へのポインター。 |
| timeout | DWORD | in | 応答待ちのタイムアウト時間。ミリ秒単位。 |
| context | void* | inout | コールバックに渡される任意のユーザーコンテキスト。NULL可。 |
戻り値の型: QStatus
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
QStatus alljoyn_proxybusobject_getpropertyasync(
alljoyn_proxybusobject proxyObj,
LPCSTR iface,
LPCSTR property,
alljoyn_proxybusobject_listener_getpropertycb_ptr callback,
DWORD timeout,
void* context
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern int alljoyn_proxybusobject_getpropertyasync(
IntPtr proxyObj, // alljoyn_proxybusobject
[MarshalAs(UnmanagedType.LPStr)] string iface, // LPCSTR
[MarshalAs(UnmanagedType.LPStr)] string property, // LPCSTR
IntPtr callback, // alljoyn_proxybusobject_listener_getpropertycb_ptr
uint timeout, // DWORD
IntPtr context // void* in/out
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_proxybusobject_getpropertyasync(
proxyObj As IntPtr, ' alljoyn_proxybusobject
<MarshalAs(UnmanagedType.LPStr)> iface As String, ' LPCSTR
<MarshalAs(UnmanagedType.LPStr)> [property] As String, ' LPCSTR
callback As IntPtr, ' alljoyn_proxybusobject_listener_getpropertycb_ptr
timeout As UInteger, ' DWORD
context As IntPtr ' void* in/out
) As Integer
End Function' proxyObj : alljoyn_proxybusobject
' iface : LPCSTR
' property : LPCSTR
' callback : alljoyn_proxybusobject_listener_getpropertycb_ptr
' timeout : DWORD
' context : void* in/out
Declare PtrSafe Function alljoyn_proxybusobject_getpropertyasync Lib "msajapi" ( _
ByVal proxyObj As LongPtr, _
ByVal iface As String, _
ByVal property As String, _
ByVal callback As LongPtr, _
ByVal timeout As Long, _
ByVal context As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_proxybusobject_getpropertyasync = ctypes.windll.msajapi.alljoyn_proxybusobject_getpropertyasync
alljoyn_proxybusobject_getpropertyasync.restype = ctypes.c_int
alljoyn_proxybusobject_getpropertyasync.argtypes = [
ctypes.c_ssize_t, # proxyObj : alljoyn_proxybusobject
wintypes.LPCSTR, # iface : LPCSTR
wintypes.LPCSTR, # property : LPCSTR
ctypes.c_void_p, # callback : alljoyn_proxybusobject_listener_getpropertycb_ptr
wintypes.DWORD, # timeout : DWORD
ctypes.POINTER(None), # context : void* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_proxybusobject_getpropertyasync = Fiddle::Function.new(
lib['alljoyn_proxybusobject_getpropertyasync'],
[
Fiddle::TYPE_INTPTR_T, # proxyObj : alljoyn_proxybusobject
Fiddle::TYPE_VOIDP, # iface : LPCSTR
Fiddle::TYPE_VOIDP, # property : LPCSTR
Fiddle::TYPE_VOIDP, # callback : alljoyn_proxybusobject_listener_getpropertycb_ptr
-Fiddle::TYPE_INT, # timeout : DWORD
Fiddle::TYPE_VOIDP, # context : void* in/out
],
Fiddle::TYPE_INT)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_proxybusobject_getpropertyasync(
proxyObj: isize, // alljoyn_proxybusobject
iface: *const u8, // LPCSTR
property: *const u8, // LPCSTR
callback: *const core::ffi::c_void, // alljoyn_proxybusobject_listener_getpropertycb_ptr
timeout: u32, // DWORD
context: *mut () // void* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern int alljoyn_proxybusobject_getpropertyasync(IntPtr proxyObj, [MarshalAs(UnmanagedType.LPStr)] string iface, [MarshalAs(UnmanagedType.LPStr)] string property, IntPtr callback, uint timeout, IntPtr context);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_proxybusobject_getpropertyasync' -Namespace Win32 -PassThru
# $api::alljoyn_proxybusobject_getpropertyasync(proxyObj, iface, property, callback, timeout, context)#uselib "MSAJApi.dll"
#func global alljoyn_proxybusobject_getpropertyasync "alljoyn_proxybusobject_getpropertyasync" sptr, sptr, sptr, sptr, sptr, sptr
; alljoyn_proxybusobject_getpropertyasync proxyObj, iface, property, callback, timeout, context ; 戻り値は stat
; proxyObj : alljoyn_proxybusobject -> "sptr"
; iface : LPCSTR -> "sptr"
; property : LPCSTR -> "sptr"
; callback : alljoyn_proxybusobject_listener_getpropertycb_ptr -> "sptr"
; timeout : DWORD -> "sptr"
; context : void* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSAJApi.dll"
#cfunc global alljoyn_proxybusobject_getpropertyasync "alljoyn_proxybusobject_getpropertyasync" sptr, str, str, sptr, int, sptr
; res = alljoyn_proxybusobject_getpropertyasync(proxyObj, iface, property, callback, timeout, context)
; proxyObj : alljoyn_proxybusobject -> "sptr"
; iface : LPCSTR -> "str"
; property : LPCSTR -> "str"
; callback : alljoyn_proxybusobject_listener_getpropertycb_ptr -> "sptr"
; timeout : DWORD -> "int"
; context : void* in/out -> "sptr"; QStatus alljoyn_proxybusobject_getpropertyasync(alljoyn_proxybusobject proxyObj, LPCSTR iface, LPCSTR property, alljoyn_proxybusobject_listener_getpropertycb_ptr callback, DWORD timeout, void* context)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_proxybusobject_getpropertyasync "alljoyn_proxybusobject_getpropertyasync" intptr, str, str, intptr, int, intptr
; res = alljoyn_proxybusobject_getpropertyasync(proxyObj, iface, property, callback, timeout, context)
; proxyObj : alljoyn_proxybusobject -> "intptr"
; iface : LPCSTR -> "str"
; property : LPCSTR -> "str"
; callback : alljoyn_proxybusobject_listener_getpropertycb_ptr -> "intptr"
; timeout : DWORD -> "int"
; context : void* in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_proxybusobject_getpropertyasync = msajapi.NewProc("alljoyn_proxybusobject_getpropertyasync")
)
// proxyObj (alljoyn_proxybusobject), iface (LPCSTR), property (LPCSTR), callback (alljoyn_proxybusobject_listener_getpropertycb_ptr), timeout (DWORD), context (void* in/out)
r1, _, err := procalljoyn_proxybusobject_getpropertyasync.Call(
uintptr(proxyObj),
uintptr(unsafe.Pointer(windows.BytePtrFromString(iface))),
uintptr(unsafe.Pointer(windows.BytePtrFromString(property))),
uintptr(callback),
uintptr(timeout),
uintptr(context),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // QStatusfunction alljoyn_proxybusobject_getpropertyasync(
proxyObj: NativeInt; // alljoyn_proxybusobject
iface: PAnsiChar; // LPCSTR
property: PAnsiChar; // LPCSTR
callback: Pointer; // alljoyn_proxybusobject_listener_getpropertycb_ptr
timeout: DWORD; // DWORD
context: Pointer // void* in/out
): Integer; stdcall;
external 'MSAJApi.dll' name 'alljoyn_proxybusobject_getpropertyasync';result := DllCall("MSAJApi\alljoyn_proxybusobject_getpropertyasync"
, "Ptr", proxyObj ; alljoyn_proxybusobject
, "AStr", iface ; LPCSTR
, "AStr", property ; LPCSTR
, "Ptr", callback ; alljoyn_proxybusobject_listener_getpropertycb_ptr
, "UInt", timeout ; DWORD
, "Ptr", context ; void* in/out
, "Int") ; return: QStatus●alljoyn_proxybusobject_getpropertyasync(proxyObj, iface, property, callback, timeout, context) = DLL("MSAJApi.dll", "int alljoyn_proxybusobject_getpropertyasync(int, char*, char*, void*, dword, void*)")
# 呼び出し: alljoyn_proxybusobject_getpropertyasync(proxyObj, iface, property, callback, timeout, context)
# proxyObj : alljoyn_proxybusobject -> "int"
# iface : LPCSTR -> "char*"
# property : LPCSTR -> "char*"
# callback : alljoyn_proxybusobject_listener_getpropertycb_ptr -> "void*"
# timeout : DWORD -> "dword"
# context : void* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。