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

alljoyn_busattachment_createinterfacesfromxml

関数
XML定義からインターフェース記述群を生成する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

QStatus alljoyn_busattachment_createinterfacesfromxml(
    alljoyn_busattachment bus,
    LPCSTR xml
);

パラメーター

名前方向
busalljoyn_busattachmentin
xmlLPCSTRin

戻り値の型: QStatus

各言語での呼び出し定義

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

QStatus alljoyn_busattachment_createinterfacesfromxml(
    alljoyn_busattachment bus,
    LPCSTR xml
);
[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern int alljoyn_busattachment_createinterfacesfromxml(
    IntPtr bus,   // alljoyn_busattachment
    [MarshalAs(UnmanagedType.LPStr)] string xml   // LPCSTR
);
<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_busattachment_createinterfacesfromxml(
    bus As IntPtr,   ' alljoyn_busattachment
    <MarshalAs(UnmanagedType.LPStr)> xml As String   ' LPCSTR
) As Integer
End Function
' bus : alljoyn_busattachment
' xml : LPCSTR
Declare PtrSafe Function alljoyn_busattachment_createinterfacesfromxml Lib "msajapi" ( _
    ByVal bus As LongPtr, _
    ByVal xml As String) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

alljoyn_busattachment_createinterfacesfromxml = ctypes.windll.msajapi.alljoyn_busattachment_createinterfacesfromxml
alljoyn_busattachment_createinterfacesfromxml.restype = ctypes.c_int
alljoyn_busattachment_createinterfacesfromxml.argtypes = [
    ctypes.c_ssize_t,  # bus : alljoyn_busattachment
    wintypes.LPCSTR,  # xml : LPCSTR
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_busattachment_createinterfacesfromxml = Fiddle::Function.new(
  lib['alljoyn_busattachment_createinterfacesfromxml'],
  [
    Fiddle::TYPE_INTPTR_T,  # bus : alljoyn_busattachment
    Fiddle::TYPE_VOIDP,  # xml : LPCSTR
  ],
  Fiddle::TYPE_INT)
#[link(name = "msajapi")]
extern "system" {
    fn alljoyn_busattachment_createinterfacesfromxml(
        bus: isize,  // alljoyn_busattachment
        xml: *const u8  // LPCSTR
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSAJApi.dll")]
public static extern int alljoyn_busattachment_createinterfacesfromxml(IntPtr bus, [MarshalAs(UnmanagedType.LPStr)] string xml);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_busattachment_createinterfacesfromxml' -Namespace Win32 -PassThru
# $api::alljoyn_busattachment_createinterfacesfromxml(bus, xml)
#uselib "MSAJApi.dll"
#func global alljoyn_busattachment_createinterfacesfromxml "alljoyn_busattachment_createinterfacesfromxml" sptr, sptr
; alljoyn_busattachment_createinterfacesfromxml bus, xml   ; 戻り値は stat
; bus : alljoyn_busattachment -> "sptr"
; xml : LPCSTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MSAJApi.dll"
#cfunc global alljoyn_busattachment_createinterfacesfromxml "alljoyn_busattachment_createinterfacesfromxml" sptr, str
; res = alljoyn_busattachment_createinterfacesfromxml(bus, xml)
; bus : alljoyn_busattachment -> "sptr"
; xml : LPCSTR -> "str"
; QStatus alljoyn_busattachment_createinterfacesfromxml(alljoyn_busattachment bus, LPCSTR xml)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_busattachment_createinterfacesfromxml "alljoyn_busattachment_createinterfacesfromxml" intptr, str
; res = alljoyn_busattachment_createinterfacesfromxml(bus, xml)
; bus : alljoyn_busattachment -> "intptr"
; xml : LPCSTR -> "str"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_busattachment_createinterfacesfromxml = msajapi.NewProc("alljoyn_busattachment_createinterfacesfromxml")
)

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