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

alljoyn_busobject_emitpropertieschanged

関数
複数プロパティの変更通知シグナルをまとめて送出する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

void alljoyn_busobject_emitpropertieschanged(
    alljoyn_busobject bus,
    LPCSTR ifcName,
    const CHAR** propNames,
    UINT_PTR numProps,
    DWORD id
);

パラメーター

名前方向説明
busalljoyn_busobjectinプロパティ変更通知を発行する対象のバスオブジェクトハンドル。
ifcNameLPCSTRin変更されたプロパティが属するインターフェース名を指すNULL終端文字列。
propNamesCHAR**in変更されたプロパティ名の配列を指すポインター。
numPropsUINT_PTRinpropNames配列に含まれるプロパティ名の個数。
idDWORDin通知を送信するセッション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 方式にも切替可。
出力引数:
; 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 方式にも切替可。
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   // void
procedure 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)。
const std = @import("std");

extern "msajapi" fn alljoyn_busobject_emitpropertieschanged(
    bus: isize, // alljoyn_busobject
    ifcName: [*c]const u8, // LPCSTR
    propNames: [*c][*c]i8, // CHAR**
    numProps: usize, // UINT_PTR
    id: u32 // DWORD
) callconv(std.os.windows.WINAPI) void;
proc alljoyn_busobject_emitpropertieschanged(
    bus: int,  # alljoyn_busobject
    ifcName: cstring,  # LPCSTR
    propNames: ptr int8,  # CHAR**
    numProps: uint,  # UINT_PTR
    id: uint32  # DWORD
) {.importc: "alljoyn_busobject_emitpropertieschanged", stdcall, dynlib: "MSAJApi.dll".}
pragma(lib, "msajapi");
extern(Windows)
void alljoyn_busobject_emitpropertieschanged(
    ptrdiff_t bus,   // alljoyn_busobject
    const(char)* ifcName,   // LPCSTR
    byte** propNames,   // CHAR**
    size_t numProps,   // UINT_PTR
    uint id   // DWORD
);
ccall((:alljoyn_busobject_emitpropertieschanged, "MSAJApi.dll"), stdcall, Cvoid,
      (Int, Cstring, Ptr{Int8}, Csize_t, UInt32),
      bus, ifcName, propNames, numProps, id)
# bus : alljoyn_busobject -> Int
# ifcName : LPCSTR -> Cstring
# propNames : CHAR** -> Ptr{Int8}
# numProps : UINT_PTR -> Csize_t
# id : DWORD -> UInt32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
local ffi = require("ffi")
ffi.cdef[[
void alljoyn_busobject_emitpropertieschanged(
    intptr_t bus,
    const char* ifcName,
    int8_t** propNames,
    uintptr_t numProps,
    uint32_t id);
]]
local msajapi = ffi.load("msajapi")
-- msajapi.alljoyn_busobject_emitpropertieschanged(bus, ifcName, propNames, numProps, id)
-- bus : alljoyn_busobject
-- ifcName : LPCSTR
-- propNames : CHAR**
-- numProps : UINT_PTR
-- id : DWORD
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
const koffi = require('koffi');
const lib = koffi.load('MSAJApi.dll');
const alljoyn_busobject_emitpropertieschanged = lib.func('__stdcall', 'alljoyn_busobject_emitpropertieschanged', 'void', ['intptr_t', 'str', 'int8_t *', 'uintptr_t', 'uint32_t']);
// alljoyn_busobject_emitpropertieschanged(bus, ifcName, propNames, numProps, id)
// bus : alljoyn_busobject -> 'intptr_t'
// ifcName : LPCSTR -> 'str'
// propNames : CHAR** -> 'int8_t *'
// numProps : UINT_PTR -> 'uintptr_t'
// id : DWORD -> 'uint32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("MSAJApi.dll", {
  alljoyn_busobject_emitpropertieschanged: { parameters: ["isize", "buffer", "pointer", "usize", "u32"], result: "void" },
});
// lib.symbols.alljoyn_busobject_emitpropertieschanged(bus, ifcName, propNames, numProps, id)
// bus : alljoyn_busobject -> "isize"
// ifcName : LPCSTR -> "buffer"
// propNames : CHAR** -> "pointer"
// numProps : UINT_PTR -> "usize"
// id : DWORD -> "u32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
void alljoyn_busobject_emitpropertieschanged(
    intptr_t bus,
    const char* ifcName,
    int8_t** propNames,
    size_t numProps,
    uint32_t id);
C, "MSAJApi.dll");
// $ffi->alljoyn_busobject_emitpropertieschanged(bus, ifcName, propNames, numProps, id);
// bus : alljoyn_busobject
// ifcName : LPCSTR
// propNames : CHAR**
// numProps : UINT_PTR
// id : DWORD
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。
import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;

public interface Msajapi extends StdCallLibrary {
    Msajapi INSTANCE = Native.load("msajapi", Msajapi.class);
    void alljoyn_busobject_emitpropertieschanged(
        long bus,   // alljoyn_busobject
        String ifcName,   // LPCSTR
        Pointer propNames,   // CHAR**
        long numProps,   // UINT_PTR
        int id   // DWORD
    );
}
@[Link("msajapi")]
lib LibMSAJApi
  fun alljoyn_busobject_emitpropertieschanged = alljoyn_busobject_emitpropertieschanged(
    bus : LibC::SSizeT,   # alljoyn_busobject
    ifcName : UInt8*,   # LPCSTR
    propNames : Int8**,   # CHAR**
    numProps : LibC::SizeT,   # UINT_PTR
    id : UInt32   # DWORD
  ) : Void
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef alljoyn_busobject_emitpropertieschangedNative = Void Function(IntPtr, Pointer<Utf8>, Pointer<Int8>, UintPtr, Uint32);
typedef alljoyn_busobject_emitpropertieschangedDart = void Function(int, Pointer<Utf8>, Pointer<Int8>, int, int);
final alljoyn_busobject_emitpropertieschanged = DynamicLibrary.open('MSAJApi.dll')
    .lookupFunction<alljoyn_busobject_emitpropertieschangedNative, alljoyn_busobject_emitpropertieschangedDart>('alljoyn_busobject_emitpropertieschanged');
// bus : alljoyn_busobject -> IntPtr
// ifcName : LPCSTR -> Pointer<Utf8>
// propNames : CHAR** -> Pointer<Int8>
// numProps : UINT_PTR -> UintPtr
// id : DWORD -> Uint32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
procedure 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';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "alljoyn_busobject_emitpropertieschanged"
  c_alljoyn_busobject_emitpropertieschanged :: CIntPtr -> CString -> Ptr Int8 -> CUIntPtr -> Word32 -> IO ()
-- bus : alljoyn_busobject -> CIntPtr
-- ifcName : LPCSTR -> CString
-- propNames : CHAR** -> Ptr Int8
-- numProps : UINT_PTR -> CUIntPtr
-- id : DWORD -> Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let alljoyn_busobject_emitpropertieschanged =
  foreign "alljoyn_busobject_emitpropertieschanged"
    (intptr_t @-> string @-> (ptr int8_t) @-> size_t @-> uint32_t @-> returning void)
(* bus : alljoyn_busobject -> intptr_t *)
(* ifcName : LPCSTR -> string *)
(* propNames : CHAR** -> (ptr int8_t) *)
(* numProps : UINT_PTR -> size_t *)
(* id : DWORD -> uint32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library msajapi (t "MSAJApi.dll"))
(cffi:use-foreign-library msajapi)

(cffi:defcfun ("alljoyn_busobject_emitpropertieschanged" alljoyn-busobject-emitpropertieschanged :convention :stdcall) :void
  (bus :int64)   ; alljoyn_busobject
  (ifc-name :string)   ; LPCSTR
  (prop-names :pointer)   ; CHAR**
  (num-props :uint64)   ; UINT_PTR
  (id :uint32))   ; DWORD
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $alljoyn_busobject_emitpropertieschanged = Win32::API::More->new('MSAJApi',
    'void alljoyn_busobject_emitpropertieschanged(LPARAM bus, LPCSTR ifcName, LPVOID propNames, WPARAM numProps, DWORD id)');
# my $ret = $alljoyn_busobject_emitpropertieschanged->Call($bus, $ifcName, $propNames, $numProps, $id);
# bus : alljoyn_busobject -> LPARAM
# ifcName : LPCSTR -> LPCSTR
# propNames : CHAR** -> LPVOID
# numProps : UINT_PTR -> WPARAM
# id : DWORD -> DWORD
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。