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

alljoyn_busattachment_deleteinterface

関数
バスから指定インターフェース記述を削除する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

QStatus alljoyn_busattachment_deleteinterface(
    alljoyn_busattachment bus,
    alljoyn_interfacedescription iface
);

パラメーター

名前方向説明
busalljoyn_busattachmentin操作対象のバスアタッチメントハンドル。AllJoyn接続を表す。
ifacealljoyn_interfacedescriptionin削除する未アクティブ化のインターフェイス記述ハンドル。

戻り値の型: QStatus

各言語での呼び出し定義

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

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

alljoyn_busattachment_deleteinterface = ctypes.windll.msajapi.alljoyn_busattachment_deleteinterface
alljoyn_busattachment_deleteinterface.restype = ctypes.c_int
alljoyn_busattachment_deleteinterface.argtypes = [
    ctypes.c_ssize_t,  # bus : alljoyn_busattachment
    ctypes.c_ssize_t,  # iface : alljoyn_interfacedescription
]
require 'fiddle'
require 'fiddle/import'

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

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_busattachment_deleteinterface = msajapi.NewProc("alljoyn_busattachment_deleteinterface")
)

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