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

alljoyn_proxybusobject_getchild

関数
指定パスの子プロキシバスオブジェクトを取得する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

alljoyn_proxybusobject alljoyn_proxybusobject_getchild(
    alljoyn_proxybusobject proxyObj,
    LPCSTR path
);

パラメーター

名前方向
proxyObjalljoyn_proxybusobjectin
pathLPCSTRin

戻り値の型: alljoyn_proxybusobject

各言語での呼び出し定義

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

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

alljoyn_proxybusobject_getchild = ctypes.windll.msajapi.alljoyn_proxybusobject_getchild
alljoyn_proxybusobject_getchild.restype = ctypes.c_ssize_t
alljoyn_proxybusobject_getchild.argtypes = [
    ctypes.c_ssize_t,  # proxyObj : alljoyn_proxybusobject
    wintypes.LPCSTR,  # path : LPCSTR
]
require 'fiddle'
require 'fiddle/import'

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

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_proxybusobject_getchild = msajapi.NewProc("alljoyn_proxybusobject_getchild")
)

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