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

alljoyn_interfacedescription_getproperties

関数
インターフェイス記述のプロパティ一覧を配列で取得する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

UINT_PTR alljoyn_interfacedescription_getproperties(
    alljoyn_interfacedescription iface,
    alljoyn_interfacedescription_property* props,
    UINT_PTR numProps
);

パラメーター

名前方向
ifacealljoyn_interfacedescriptionin
propsalljoyn_interfacedescription_property*inout
numPropsUINT_PTRin

戻り値の型: UINT_PTR

各言語での呼び出し定義

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

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

alljoyn_interfacedescription_getproperties = ctypes.windll.msajapi.alljoyn_interfacedescription_getproperties
alljoyn_interfacedescription_getproperties.restype = ctypes.c_size_t
alljoyn_interfacedescription_getproperties.argtypes = [
    ctypes.c_ssize_t,  # iface : alljoyn_interfacedescription
    ctypes.c_void_p,  # props : alljoyn_interfacedescription_property* in/out
    ctypes.c_size_t,  # numProps : UINT_PTR
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_interfacedescription_getproperties = Fiddle::Function.new(
  lib['alljoyn_interfacedescription_getproperties'],
  [
    Fiddle::TYPE_INTPTR_T,  # iface : alljoyn_interfacedescription
    Fiddle::TYPE_VOIDP,  # props : alljoyn_interfacedescription_property* in/out
    Fiddle::TYPE_UINTPTR_T,  # numProps : UINT_PTR
  ],
  Fiddle::TYPE_UINTPTR_T)
#[link(name = "msajapi")]
extern "system" {
    fn alljoyn_interfacedescription_getproperties(
        iface: isize,  // alljoyn_interfacedescription
        props: *mut alljoyn_interfacedescription_property,  // alljoyn_interfacedescription_property* in/out
        numProps: usize  // UINT_PTR
    ) -> usize;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSAJApi.dll")]
public static extern UIntPtr alljoyn_interfacedescription_getproperties(IntPtr iface, IntPtr props, UIntPtr numProps);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_interfacedescription_getproperties' -Namespace Win32 -PassThru
# $api::alljoyn_interfacedescription_getproperties(iface, props, numProps)
#uselib "MSAJApi.dll"
#func global alljoyn_interfacedescription_getproperties "alljoyn_interfacedescription_getproperties" sptr, sptr, sptr
; alljoyn_interfacedescription_getproperties iface, varptr(props), numProps   ; 戻り値は stat
; iface : alljoyn_interfacedescription -> "sptr"
; props : alljoyn_interfacedescription_property* in/out -> "sptr"
; numProps : UINT_PTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "MSAJApi.dll"
#cfunc global alljoyn_interfacedescription_getproperties "alljoyn_interfacedescription_getproperties" sptr, var, sptr
; res = alljoyn_interfacedescription_getproperties(iface, props, numProps)
; iface : alljoyn_interfacedescription -> "sptr"
; props : alljoyn_interfacedescription_property* in/out -> "var"
; numProps : UINT_PTR -> "sptr"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; UINT_PTR alljoyn_interfacedescription_getproperties(alljoyn_interfacedescription iface, alljoyn_interfacedescription_property* props, UINT_PTR numProps)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_interfacedescription_getproperties "alljoyn_interfacedescription_getproperties" intptr, var, intptr
; res = alljoyn_interfacedescription_getproperties(iface, props, numProps)
; iface : alljoyn_interfacedescription -> "intptr"
; props : alljoyn_interfacedescription_property* in/out -> "var"
; numProps : UINT_PTR -> "intptr"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_interfacedescription_getproperties = msajapi.NewProc("alljoyn_interfacedescription_getproperties")
)

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