ホーム › Devices.AllJoyn › alljoyn_busattachment_cancelfindadvertisednamebytransport
alljoyn_busattachment_cancelfindadvertisednamebytransport
関数トランスポート指定の広告名探索を取り消す。
シグネチャ
// MSAJApi.dll
#include <windows.h>
QStatus alljoyn_busattachment_cancelfindadvertisednamebytransport(
alljoyn_busattachment bus,
LPCSTR namePrefix,
WORD transports
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| bus | alljoyn_busattachment | in |
| namePrefix | LPCSTR | in |
| transports | WORD | in |
戻り値の型: QStatus
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
QStatus alljoyn_busattachment_cancelfindadvertisednamebytransport(
alljoyn_busattachment bus,
LPCSTR namePrefix,
WORD transports
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern int alljoyn_busattachment_cancelfindadvertisednamebytransport(
IntPtr bus, // alljoyn_busattachment
[MarshalAs(UnmanagedType.LPStr)] string namePrefix, // LPCSTR
ushort transports // WORD
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_busattachment_cancelfindadvertisednamebytransport(
bus As IntPtr, ' alljoyn_busattachment
<MarshalAs(UnmanagedType.LPStr)> namePrefix As String, ' LPCSTR
transports As UShort ' WORD
) As Integer
End Function' bus : alljoyn_busattachment
' namePrefix : LPCSTR
' transports : WORD
Declare PtrSafe Function alljoyn_busattachment_cancelfindadvertisednamebytransport Lib "msajapi" ( _
ByVal bus As LongPtr, _
ByVal namePrefix As String, _
ByVal transports As Integer) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_busattachment_cancelfindadvertisednamebytransport = ctypes.windll.msajapi.alljoyn_busattachment_cancelfindadvertisednamebytransport
alljoyn_busattachment_cancelfindadvertisednamebytransport.restype = ctypes.c_int
alljoyn_busattachment_cancelfindadvertisednamebytransport.argtypes = [
ctypes.c_ssize_t, # bus : alljoyn_busattachment
wintypes.LPCSTR, # namePrefix : LPCSTR
ctypes.c_ushort, # transports : WORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_busattachment_cancelfindadvertisednamebytransport = Fiddle::Function.new(
lib['alljoyn_busattachment_cancelfindadvertisednamebytransport'],
[
Fiddle::TYPE_INTPTR_T, # bus : alljoyn_busattachment
Fiddle::TYPE_VOIDP, # namePrefix : LPCSTR
-Fiddle::TYPE_SHORT, # transports : WORD
],
Fiddle::TYPE_INT)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_busattachment_cancelfindadvertisednamebytransport(
bus: isize, // alljoyn_busattachment
namePrefix: *const u8, // LPCSTR
transports: u16 // WORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern int alljoyn_busattachment_cancelfindadvertisednamebytransport(IntPtr bus, [MarshalAs(UnmanagedType.LPStr)] string namePrefix, ushort transports);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_busattachment_cancelfindadvertisednamebytransport' -Namespace Win32 -PassThru
# $api::alljoyn_busattachment_cancelfindadvertisednamebytransport(bus, namePrefix, transports)#uselib "MSAJApi.dll"
#func global alljoyn_busattachment_cancelfindadvertisednamebytransport "alljoyn_busattachment_cancelfindadvertisednamebytransport" sptr, sptr, sptr
; alljoyn_busattachment_cancelfindadvertisednamebytransport bus, namePrefix, transports ; 戻り値は stat
; bus : alljoyn_busattachment -> "sptr"
; namePrefix : LPCSTR -> "sptr"
; transports : WORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSAJApi.dll"
#cfunc global alljoyn_busattachment_cancelfindadvertisednamebytransport "alljoyn_busattachment_cancelfindadvertisednamebytransport" sptr, str, int
; res = alljoyn_busattachment_cancelfindadvertisednamebytransport(bus, namePrefix, transports)
; bus : alljoyn_busattachment -> "sptr"
; namePrefix : LPCSTR -> "str"
; transports : WORD -> "int"; QStatus alljoyn_busattachment_cancelfindadvertisednamebytransport(alljoyn_busattachment bus, LPCSTR namePrefix, WORD transports)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_busattachment_cancelfindadvertisednamebytransport "alljoyn_busattachment_cancelfindadvertisednamebytransport" intptr, str, int
; res = alljoyn_busattachment_cancelfindadvertisednamebytransport(bus, namePrefix, transports)
; bus : alljoyn_busattachment -> "intptr"
; namePrefix : LPCSTR -> "str"
; transports : WORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_busattachment_cancelfindadvertisednamebytransport = msajapi.NewProc("alljoyn_busattachment_cancelfindadvertisednamebytransport")
)
// bus (alljoyn_busattachment), namePrefix (LPCSTR), transports (WORD)
r1, _, err := procalljoyn_busattachment_cancelfindadvertisednamebytransport.Call(
uintptr(bus),
uintptr(unsafe.Pointer(windows.BytePtrFromString(namePrefix))),
uintptr(transports),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // QStatusfunction alljoyn_busattachment_cancelfindadvertisednamebytransport(
bus: NativeInt; // alljoyn_busattachment
namePrefix: PAnsiChar; // LPCSTR
transports: Word // WORD
): Integer; stdcall;
external 'MSAJApi.dll' name 'alljoyn_busattachment_cancelfindadvertisednamebytransport';result := DllCall("MSAJApi\alljoyn_busattachment_cancelfindadvertisednamebytransport"
, "Ptr", bus ; alljoyn_busattachment
, "AStr", namePrefix ; LPCSTR
, "UShort", transports ; WORD
, "Int") ; return: QStatus●alljoyn_busattachment_cancelfindadvertisednamebytransport(bus, namePrefix, transports) = DLL("MSAJApi.dll", "int alljoyn_busattachment_cancelfindadvertisednamebytransport(int, char*, int)")
# 呼び出し: alljoyn_busattachment_cancelfindadvertisednamebytransport(bus, namePrefix, transports)
# bus : alljoyn_busattachment -> "int"
# namePrefix : LPCSTR -> "char*"
# transports : WORD -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。