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

alljoyn_busobject_methodreply_args

関数
メソッド呼出に対し引数を付けて成功応答を返す。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

QStatus alljoyn_busobject_methodreply_args(
    alljoyn_busobject bus,
    alljoyn_message msg,
    alljoyn_msgarg args,
    UINT_PTR numArgs
);

パラメーター

名前方向
busalljoyn_busobjectin
msgalljoyn_messagein
argsalljoyn_msgargin
numArgsUINT_PTRin

戻り値の型: QStatus

各言語での呼び出し定義

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

QStatus alljoyn_busobject_methodreply_args(
    alljoyn_busobject bus,
    alljoyn_message msg,
    alljoyn_msgarg args,
    UINT_PTR numArgs
);
[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern int alljoyn_busobject_methodreply_args(
    IntPtr bus,   // alljoyn_busobject
    IntPtr msg,   // alljoyn_message
    IntPtr args,   // alljoyn_msgarg
    UIntPtr numArgs   // UINT_PTR
);
<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_busobject_methodreply_args(
    bus As IntPtr,   ' alljoyn_busobject
    msg As IntPtr,   ' alljoyn_message
    args As IntPtr,   ' alljoyn_msgarg
    numArgs As UIntPtr   ' UINT_PTR
) As Integer
End Function
' bus : alljoyn_busobject
' msg : alljoyn_message
' args : alljoyn_msgarg
' numArgs : UINT_PTR
Declare PtrSafe Function alljoyn_busobject_methodreply_args Lib "msajapi" ( _
    ByVal bus As LongPtr, _
    ByVal msg As LongPtr, _
    ByVal args As LongPtr, _
    ByVal numArgs As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

alljoyn_busobject_methodreply_args = ctypes.windll.msajapi.alljoyn_busobject_methodreply_args
alljoyn_busobject_methodreply_args.restype = ctypes.c_int
alljoyn_busobject_methodreply_args.argtypes = [
    ctypes.c_ssize_t,  # bus : alljoyn_busobject
    ctypes.c_ssize_t,  # msg : alljoyn_message
    ctypes.c_ssize_t,  # args : alljoyn_msgarg
    ctypes.c_size_t,  # numArgs : UINT_PTR
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_busobject_methodreply_args = Fiddle::Function.new(
  lib['alljoyn_busobject_methodreply_args'],
  [
    Fiddle::TYPE_INTPTR_T,  # bus : alljoyn_busobject
    Fiddle::TYPE_INTPTR_T,  # msg : alljoyn_message
    Fiddle::TYPE_INTPTR_T,  # args : alljoyn_msgarg
    Fiddle::TYPE_UINTPTR_T,  # numArgs : UINT_PTR
  ],
  Fiddle::TYPE_INT)
#[link(name = "msajapi")]
extern "system" {
    fn alljoyn_busobject_methodreply_args(
        bus: isize,  // alljoyn_busobject
        msg: isize,  // alljoyn_message
        args: isize,  // alljoyn_msgarg
        numArgs: usize  // UINT_PTR
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSAJApi.dll")]
public static extern int alljoyn_busobject_methodreply_args(IntPtr bus, IntPtr msg, IntPtr args, UIntPtr numArgs);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_busobject_methodreply_args' -Namespace Win32 -PassThru
# $api::alljoyn_busobject_methodreply_args(bus, msg, args, numArgs)
#uselib "MSAJApi.dll"
#func global alljoyn_busobject_methodreply_args "alljoyn_busobject_methodreply_args" sptr, sptr, sptr, sptr
; alljoyn_busobject_methodreply_args bus, msg, args, numArgs   ; 戻り値は stat
; bus : alljoyn_busobject -> "sptr"
; msg : alljoyn_message -> "sptr"
; args : alljoyn_msgarg -> "sptr"
; numArgs : UINT_PTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MSAJApi.dll"
#cfunc global alljoyn_busobject_methodreply_args "alljoyn_busobject_methodreply_args" sptr, sptr, sptr, sptr
; res = alljoyn_busobject_methodreply_args(bus, msg, args, numArgs)
; bus : alljoyn_busobject -> "sptr"
; msg : alljoyn_message -> "sptr"
; args : alljoyn_msgarg -> "sptr"
; numArgs : UINT_PTR -> "sptr"
; QStatus alljoyn_busobject_methodreply_args(alljoyn_busobject bus, alljoyn_message msg, alljoyn_msgarg args, UINT_PTR numArgs)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_busobject_methodreply_args "alljoyn_busobject_methodreply_args" intptr, intptr, intptr, intptr
; res = alljoyn_busobject_methodreply_args(bus, msg, args, numArgs)
; bus : alljoyn_busobject -> "intptr"
; msg : alljoyn_message -> "intptr"
; args : alljoyn_msgarg -> "intptr"
; numArgs : UINT_PTR -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_busobject_methodreply_args = msajapi.NewProc("alljoyn_busobject_methodreply_args")
)

// bus (alljoyn_busobject), msg (alljoyn_message), args (alljoyn_msgarg), numArgs (UINT_PTR)
r1, _, err := procalljoyn_busobject_methodreply_args.Call(
	uintptr(bus),
	uintptr(msg),
	uintptr(args),
	uintptr(numArgs),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // QStatus
function alljoyn_busobject_methodreply_args(
  bus: NativeInt;   // alljoyn_busobject
  msg: NativeInt;   // alljoyn_message
  args: NativeInt;   // alljoyn_msgarg
  numArgs: NativeUInt   // UINT_PTR
): Integer; stdcall;
  external 'MSAJApi.dll' name 'alljoyn_busobject_methodreply_args';
result := DllCall("MSAJApi\alljoyn_busobject_methodreply_args"
    , "Ptr", bus   ; alljoyn_busobject
    , "Ptr", msg   ; alljoyn_message
    , "Ptr", args   ; alljoyn_msgarg
    , "UPtr", numArgs   ; UINT_PTR
    , "Int")   ; return: QStatus
●alljoyn_busobject_methodreply_args(bus, msg, args, numArgs) = DLL("MSAJApi.dll", "int alljoyn_busobject_methodreply_args(int, int, int, int)")
# 呼び出し: alljoyn_busobject_methodreply_args(bus, msg, args, numArgs)
# bus : alljoyn_busobject -> "int"
# msg : alljoyn_message -> "int"
# args : alljoyn_msgarg -> "int"
# numArgs : UINT_PTR -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。