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

alljoyn_busattachment_registeraboutlistener

関数
About通知を受信するAboutリスナーをバスに登録する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

void alljoyn_busattachment_registeraboutlistener(
    alljoyn_busattachment bus,
    alljoyn_aboutlistener aboutListener
);

パラメーター

名前方向
busalljoyn_busattachmentin
aboutListeneralljoyn_aboutlistenerin

戻り値の型: void

各言語での呼び出し定義

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

void alljoyn_busattachment_registeraboutlistener(
    alljoyn_busattachment bus,
    alljoyn_aboutlistener aboutListener
);
[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern void alljoyn_busattachment_registeraboutlistener(
    IntPtr bus,   // alljoyn_busattachment
    IntPtr aboutListener   // alljoyn_aboutlistener
);
<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Sub alljoyn_busattachment_registeraboutlistener(
    bus As IntPtr,   ' alljoyn_busattachment
    aboutListener As IntPtr   ' alljoyn_aboutlistener
)
End Sub
' bus : alljoyn_busattachment
' aboutListener : alljoyn_aboutlistener
Declare PtrSafe Sub alljoyn_busattachment_registeraboutlistener Lib "msajapi" ( _
    ByVal bus As LongPtr, _
    ByVal aboutListener As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

alljoyn_busattachment_registeraboutlistener = ctypes.windll.msajapi.alljoyn_busattachment_registeraboutlistener
alljoyn_busattachment_registeraboutlistener.restype = None
alljoyn_busattachment_registeraboutlistener.argtypes = [
    ctypes.c_ssize_t,  # bus : alljoyn_busattachment
    ctypes.c_ssize_t,  # aboutListener : alljoyn_aboutlistener
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_busattachment_registeraboutlistener = Fiddle::Function.new(
  lib['alljoyn_busattachment_registeraboutlistener'],
  [
    Fiddle::TYPE_INTPTR_T,  # bus : alljoyn_busattachment
    Fiddle::TYPE_INTPTR_T,  # aboutListener : alljoyn_aboutlistener
  ],
  Fiddle::TYPE_VOID)
#[link(name = "msajapi")]
extern "system" {
    fn alljoyn_busattachment_registeraboutlistener(
        bus: isize,  // alljoyn_busattachment
        aboutListener: isize  // alljoyn_aboutlistener
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSAJApi.dll")]
public static extern void alljoyn_busattachment_registeraboutlistener(IntPtr bus, IntPtr aboutListener);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_busattachment_registeraboutlistener' -Namespace Win32 -PassThru
# $api::alljoyn_busattachment_registeraboutlistener(bus, aboutListener)
#uselib "MSAJApi.dll"
#func global alljoyn_busattachment_registeraboutlistener "alljoyn_busattachment_registeraboutlistener" sptr, sptr
; alljoyn_busattachment_registeraboutlistener bus, aboutListener
; bus : alljoyn_busattachment -> "sptr"
; aboutListener : alljoyn_aboutlistener -> "sptr"
#uselib "MSAJApi.dll"
#func global alljoyn_busattachment_registeraboutlistener "alljoyn_busattachment_registeraboutlistener" sptr, sptr
; alljoyn_busattachment_registeraboutlistener bus, aboutListener
; bus : alljoyn_busattachment -> "sptr"
; aboutListener : alljoyn_aboutlistener -> "sptr"
; void alljoyn_busattachment_registeraboutlistener(alljoyn_busattachment bus, alljoyn_aboutlistener aboutListener)
#uselib "MSAJApi.dll"
#func global alljoyn_busattachment_registeraboutlistener "alljoyn_busattachment_registeraboutlistener" intptr, intptr
; alljoyn_busattachment_registeraboutlistener bus, aboutListener
; bus : alljoyn_busattachment -> "intptr"
; aboutListener : alljoyn_aboutlistener -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_busattachment_registeraboutlistener = msajapi.NewProc("alljoyn_busattachment_registeraboutlistener")
)

// bus (alljoyn_busattachment), aboutListener (alljoyn_aboutlistener)
r1, _, err := procalljoyn_busattachment_registeraboutlistener.Call(
	uintptr(bus),
	uintptr(aboutListener),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure alljoyn_busattachment_registeraboutlistener(
  bus: NativeInt;   // alljoyn_busattachment
  aboutListener: NativeInt   // alljoyn_aboutlistener
); stdcall;
  external 'MSAJApi.dll' name 'alljoyn_busattachment_registeraboutlistener';
result := DllCall("MSAJApi\alljoyn_busattachment_registeraboutlistener"
    , "Ptr", bus   ; alljoyn_busattachment
    , "Ptr", aboutListener   ; alljoyn_aboutlistener
    , "Int")   ; return: void
●alljoyn_busattachment_registeraboutlistener(bus, aboutListener) = DLL("MSAJApi.dll", "int alljoyn_busattachment_registeraboutlistener(int, int)")
# 呼び出し: alljoyn_busattachment_registeraboutlistener(bus, aboutListener)
# bus : alljoyn_busattachment -> "int"
# aboutListener : alljoyn_aboutlistener -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。