ホーム › Devices.AllJoyn › alljoyn_busobject_getpath
alljoyn_busobject_getpath
関数バスオブジェクトのオブジェクトパスを取得する。
シグネチャ
// MSAJApi.dll
#include <windows.h>
LPSTR alljoyn_busobject_getpath(
alljoyn_busobject bus
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| bus | alljoyn_busobject | in | オブジェクトパスを取得する対象のバスオブジェクトハンドル。 |
戻り値の型: LPSTR
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
LPSTR alljoyn_busobject_getpath(
alljoyn_busobject bus
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern IntPtr alljoyn_busobject_getpath(
IntPtr bus // alljoyn_busobject
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_busobject_getpath(
bus As IntPtr ' alljoyn_busobject
) As IntPtr
End Function' bus : alljoyn_busobject
Declare PtrSafe Function alljoyn_busobject_getpath Lib "msajapi" ( _
ByVal bus As LongPtr) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_busobject_getpath = ctypes.windll.msajapi.alljoyn_busobject_getpath
alljoyn_busobject_getpath.restype = wintypes.LPSTR
alljoyn_busobject_getpath.argtypes = [
ctypes.c_ssize_t, # bus : alljoyn_busobject
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_busobject_getpath = Fiddle::Function.new(
lib['alljoyn_busobject_getpath'],
[
Fiddle::TYPE_INTPTR_T, # bus : alljoyn_busobject
],
Fiddle::TYPE_VOIDP)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_busobject_getpath(
bus: isize // alljoyn_busobject
) -> *mut u8;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern IntPtr alljoyn_busobject_getpath(IntPtr bus);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_busobject_getpath' -Namespace Win32 -PassThru
# $api::alljoyn_busobject_getpath(bus)#uselib "MSAJApi.dll"
#func global alljoyn_busobject_getpath "alljoyn_busobject_getpath" sptr
; alljoyn_busobject_getpath bus ; 戻り値は stat
; bus : alljoyn_busobject -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSAJApi.dll"
#cfunc global alljoyn_busobject_getpath "alljoyn_busobject_getpath" sptr
; res = alljoyn_busobject_getpath(bus)
; bus : alljoyn_busobject -> "sptr"; LPSTR alljoyn_busobject_getpath(alljoyn_busobject bus)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_busobject_getpath "alljoyn_busobject_getpath" intptr
; res = alljoyn_busobject_getpath(bus)
; bus : alljoyn_busobject -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_busobject_getpath = msajapi.NewProc("alljoyn_busobject_getpath")
)
// bus (alljoyn_busobject)
r1, _, err := procalljoyn_busobject_getpath.Call(
uintptr(bus),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // LPSTRfunction alljoyn_busobject_getpath(
bus: NativeInt // alljoyn_busobject
): PAnsiChar; stdcall;
external 'MSAJApi.dll' name 'alljoyn_busobject_getpath';result := DllCall("MSAJApi\alljoyn_busobject_getpath"
, "Ptr", bus ; alljoyn_busobject
, "Ptr") ; return: LPSTR●alljoyn_busobject_getpath(bus) = DLL("MSAJApi.dll", "char* alljoyn_busobject_getpath(int)")
# 呼び出し: alljoyn_busobject_getpath(bus)
# bus : alljoyn_busobject -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。