ホーム › Devices.AllJoyn › alljoyn_busobject_emitpropertieschanged
alljoyn_busobject_emitpropertieschanged
関数複数プロパティの変更通知シグナルをまとめて送出する。
シグネチャ
// MSAJApi.dll
#include <windows.h>
void alljoyn_busobject_emitpropertieschanged(
alljoyn_busobject bus,
LPCSTR ifcName,
const CHAR** propNames,
UINT_PTR numProps,
DWORD id
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| bus | alljoyn_busobject | in | プロパティ変更通知を発行する対象のバスオブジェクトハンドル。 |
| ifcName | LPCSTR | in | 変更されたプロパティが属するインターフェース名を指すNULL終端文字列。 |
| propNames | CHAR** | in | 変更されたプロパティ名の配列を指すポインター。 |
| numProps | UINT_PTR | in | propNames配列に含まれるプロパティ名の個数。 |
| id | DWORD | in | 通知を送信するセッションID。0で全セッション対象。 |
戻り値の型: void
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
void alljoyn_busobject_emitpropertieschanged(
alljoyn_busobject bus,
LPCSTR ifcName,
const CHAR** propNames,
UINT_PTR numProps,
DWORD id
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern void alljoyn_busobject_emitpropertieschanged(
IntPtr bus, // alljoyn_busobject
[MarshalAs(UnmanagedType.LPStr)] string ifcName, // LPCSTR
IntPtr propNames, // CHAR**
UIntPtr numProps, // UINT_PTR
uint id // DWORD
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Sub alljoyn_busobject_emitpropertieschanged(
bus As IntPtr, ' alljoyn_busobject
<MarshalAs(UnmanagedType.LPStr)> ifcName As String, ' LPCSTR
propNames As IntPtr, ' CHAR**
numProps As UIntPtr, ' UINT_PTR
id As UInteger ' DWORD
)
End Sub' bus : alljoyn_busobject
' ifcName : LPCSTR
' propNames : CHAR**
' numProps : UINT_PTR
' id : DWORD
Declare PtrSafe Sub alljoyn_busobject_emitpropertieschanged Lib "msajapi" ( _
ByVal bus As LongPtr, _
ByVal ifcName As String, _
ByVal propNames As LongPtr, _
ByVal numProps As LongPtr, _
ByVal id As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_busobject_emitpropertieschanged = ctypes.windll.msajapi.alljoyn_busobject_emitpropertieschanged
alljoyn_busobject_emitpropertieschanged.restype = None
alljoyn_busobject_emitpropertieschanged.argtypes = [
ctypes.c_ssize_t, # bus : alljoyn_busobject
wintypes.LPCSTR, # ifcName : LPCSTR
ctypes.c_void_p, # propNames : CHAR**
ctypes.c_size_t, # numProps : UINT_PTR
wintypes.DWORD, # id : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_busobject_emitpropertieschanged = Fiddle::Function.new(
lib['alljoyn_busobject_emitpropertieschanged'],
[
Fiddle::TYPE_INTPTR_T, # bus : alljoyn_busobject
Fiddle::TYPE_VOIDP, # ifcName : LPCSTR
Fiddle::TYPE_VOIDP, # propNames : CHAR**
Fiddle::TYPE_UINTPTR_T, # numProps : UINT_PTR
-Fiddle::TYPE_INT, # id : DWORD
],
Fiddle::TYPE_VOID)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_busobject_emitpropertieschanged(
bus: isize, // alljoyn_busobject
ifcName: *const u8, // LPCSTR
propNames: *const *const i8, // CHAR**
numProps: usize, // UINT_PTR
id: u32 // DWORD
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern void alljoyn_busobject_emitpropertieschanged(IntPtr bus, [MarshalAs(UnmanagedType.LPStr)] string ifcName, IntPtr propNames, UIntPtr numProps, uint id);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_busobject_emitpropertieschanged' -Namespace Win32 -PassThru
# $api::alljoyn_busobject_emitpropertieschanged(bus, ifcName, propNames, numProps, id)#uselib "MSAJApi.dll"
#func global alljoyn_busobject_emitpropertieschanged "alljoyn_busobject_emitpropertieschanged" sptr, sptr, sptr, sptr, sptr
; alljoyn_busobject_emitpropertieschanged bus, ifcName, varptr(propNames), numProps, id
; bus : alljoyn_busobject -> "sptr"
; ifcName : LPCSTR -> "sptr"
; propNames : CHAR** -> "sptr"
; numProps : UINT_PTR -> "sptr"
; id : DWORD -> "sptr"出力引数:
#uselib "MSAJApi.dll" #func global alljoyn_busobject_emitpropertieschanged "alljoyn_busobject_emitpropertieschanged" sptr, str, var, sptr, int ; alljoyn_busobject_emitpropertieschanged bus, ifcName, propNames, numProps, id ; bus : alljoyn_busobject -> "sptr" ; ifcName : LPCSTR -> "str" ; propNames : CHAR** -> "var" ; numProps : UINT_PTR -> "sptr" ; id : DWORD -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "MSAJApi.dll" #func global alljoyn_busobject_emitpropertieschanged "alljoyn_busobject_emitpropertieschanged" sptr, str, sptr, sptr, int ; alljoyn_busobject_emitpropertieschanged bus, ifcName, varptr(propNames), numProps, id ; bus : alljoyn_busobject -> "sptr" ; ifcName : LPCSTR -> "str" ; propNames : CHAR** -> "sptr" ; numProps : UINT_PTR -> "sptr" ; id : DWORD -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void alljoyn_busobject_emitpropertieschanged(alljoyn_busobject bus, LPCSTR ifcName, CHAR** propNames, UINT_PTR numProps, DWORD id) #uselib "MSAJApi.dll" #func global alljoyn_busobject_emitpropertieschanged "alljoyn_busobject_emitpropertieschanged" intptr, str, var, intptr, int ; alljoyn_busobject_emitpropertieschanged bus, ifcName, propNames, numProps, id ; bus : alljoyn_busobject -> "intptr" ; ifcName : LPCSTR -> "str" ; propNames : CHAR** -> "var" ; numProps : UINT_PTR -> "intptr" ; id : DWORD -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void alljoyn_busobject_emitpropertieschanged(alljoyn_busobject bus, LPCSTR ifcName, CHAR** propNames, UINT_PTR numProps, DWORD id) #uselib "MSAJApi.dll" #func global alljoyn_busobject_emitpropertieschanged "alljoyn_busobject_emitpropertieschanged" intptr, str, intptr, intptr, int ; alljoyn_busobject_emitpropertieschanged bus, ifcName, varptr(propNames), numProps, id ; bus : alljoyn_busobject -> "intptr" ; ifcName : LPCSTR -> "str" ; propNames : CHAR** -> "intptr" ; numProps : UINT_PTR -> "intptr" ; id : DWORD -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_busobject_emitpropertieschanged = msajapi.NewProc("alljoyn_busobject_emitpropertieschanged")
)
// bus (alljoyn_busobject), ifcName (LPCSTR), propNames (CHAR**), numProps (UINT_PTR), id (DWORD)
r1, _, err := procalljoyn_busobject_emitpropertieschanged.Call(
uintptr(bus),
uintptr(unsafe.Pointer(windows.BytePtrFromString(ifcName))),
uintptr(propNames),
uintptr(numProps),
uintptr(id),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure alljoyn_busobject_emitpropertieschanged(
bus: NativeInt; // alljoyn_busobject
ifcName: PAnsiChar; // LPCSTR
propNames: Pointer; // CHAR**
numProps: NativeUInt; // UINT_PTR
id: DWORD // DWORD
); stdcall;
external 'MSAJApi.dll' name 'alljoyn_busobject_emitpropertieschanged';result := DllCall("MSAJApi\alljoyn_busobject_emitpropertieschanged"
, "Ptr", bus ; alljoyn_busobject
, "AStr", ifcName ; LPCSTR
, "Ptr", propNames ; CHAR**
, "UPtr", numProps ; UINT_PTR
, "UInt", id ; DWORD
, "Int") ; return: void●alljoyn_busobject_emitpropertieschanged(bus, ifcName, propNames, numProps, id) = DLL("MSAJApi.dll", "int alljoyn_busobject_emitpropertieschanged(int, char*, void*, int, dword)")
# 呼び出し: alljoyn_busobject_emitpropertieschanged(bus, ifcName, propNames, numProps, id)
# bus : alljoyn_busobject -> "int"
# ifcName : LPCSTR -> "char*"
# propNames : CHAR** -> "void*"
# numProps : UINT_PTR -> "int"
# id : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。