ホーム › Devices.AllJoyn › alljoyn_interfacedescription_property_getannotationatindex
alljoyn_interfacedescription_property_getannotationatindex
関数プロパティの指定インデックスの注釈名と値を取得する。
シグネチャ
// MSAJApi.dll
#include <windows.h>
void alljoyn_interfacedescription_property_getannotationatindex(
alljoyn_interfacedescription_property property,
UINT_PTR index,
LPSTR name,
UINT_PTR* name_size,
LPSTR value,
UINT_PTR* value_size
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| property | alljoyn_interfacedescription_property | in |
| index | UINT_PTR | in |
| name | LPSTR | in |
| name_size | UINT_PTR* | inout |
| value | LPSTR | in |
| value_size | UINT_PTR* | inout |
戻り値の型: void
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
void alljoyn_interfacedescription_property_getannotationatindex(
alljoyn_interfacedescription_property property,
UINT_PTR index,
LPSTR name,
UINT_PTR* name_size,
LPSTR value,
UINT_PTR* value_size
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern void alljoyn_interfacedescription_property_getannotationatindex(
alljoyn_interfacedescription_property property, // alljoyn_interfacedescription_property
UIntPtr index, // UINT_PTR
[MarshalAs(UnmanagedType.LPStr)] string name, // LPSTR
ref UIntPtr name_size, // UINT_PTR* in/out
[MarshalAs(UnmanagedType.LPStr)] string value, // LPSTR
ref UIntPtr value_size // UINT_PTR* in/out
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Sub alljoyn_interfacedescription_property_getannotationatindex(
[property] As alljoyn_interfacedescription_property, ' alljoyn_interfacedescription_property
index As UIntPtr, ' UINT_PTR
<MarshalAs(UnmanagedType.LPStr)> name As String, ' LPSTR
ByRef name_size As UIntPtr, ' UINT_PTR* in/out
<MarshalAs(UnmanagedType.LPStr)> value As String, ' LPSTR
ByRef value_size As UIntPtr ' UINT_PTR* in/out
)
End Sub' property : alljoyn_interfacedescription_property
' index : UINT_PTR
' name : LPSTR
' name_size : UINT_PTR* in/out
' value : LPSTR
' value_size : UINT_PTR* in/out
Declare PtrSafe Sub alljoyn_interfacedescription_property_getannotationatindex Lib "msajapi" ( _
ByVal property As LongPtr, _
ByVal index As LongPtr, _
ByVal name As String, _
ByRef name_size As LongPtr, _
ByVal value As String, _
ByRef value_size As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_interfacedescription_property_getannotationatindex = ctypes.windll.msajapi.alljoyn_interfacedescription_property_getannotationatindex
alljoyn_interfacedescription_property_getannotationatindex.restype = None
alljoyn_interfacedescription_property_getannotationatindex.argtypes = [
alljoyn_interfacedescription_property, # property : alljoyn_interfacedescription_property
ctypes.c_size_t, # index : UINT_PTR
wintypes.LPCSTR, # name : LPSTR
ctypes.POINTER(ctypes.c_size_t), # name_size : UINT_PTR* in/out
wintypes.LPCSTR, # value : LPSTR
ctypes.POINTER(ctypes.c_size_t), # value_size : UINT_PTR* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_interfacedescription_property_getannotationatindex = Fiddle::Function.new(
lib['alljoyn_interfacedescription_property_getannotationatindex'],
[
Fiddle::TYPE_VOIDP, # property : alljoyn_interfacedescription_property
Fiddle::TYPE_UINTPTR_T, # index : UINT_PTR
Fiddle::TYPE_VOIDP, # name : LPSTR
Fiddle::TYPE_VOIDP, # name_size : UINT_PTR* in/out
Fiddle::TYPE_VOIDP, # value : LPSTR
Fiddle::TYPE_VOIDP, # value_size : UINT_PTR* in/out
],
Fiddle::TYPE_VOID)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_interfacedescription_property_getannotationatindex(
property: alljoyn_interfacedescription_property, // alljoyn_interfacedescription_property
index: usize, // UINT_PTR
name: *mut u8, // LPSTR
name_size: *mut usize, // UINT_PTR* in/out
value: *mut u8, // LPSTR
value_size: *mut usize // UINT_PTR* in/out
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern void alljoyn_interfacedescription_property_getannotationatindex(alljoyn_interfacedescription_property property, UIntPtr index, [MarshalAs(UnmanagedType.LPStr)] string name, ref UIntPtr name_size, [MarshalAs(UnmanagedType.LPStr)] string value, ref UIntPtr value_size);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_interfacedescription_property_getannotationatindex' -Namespace Win32 -PassThru
# $api::alljoyn_interfacedescription_property_getannotationatindex(property, index, name, name_size, value, value_size)#uselib "MSAJApi.dll"
#func global alljoyn_interfacedescription_property_getannotationatindex "alljoyn_interfacedescription_property_getannotationatindex" sptr, sptr, sptr, sptr, sptr, sptr
; alljoyn_interfacedescription_property_getannotationatindex property, index, name, varptr(name_size), value, varptr(value_size)
; property : alljoyn_interfacedescription_property -> "sptr"
; index : UINT_PTR -> "sptr"
; name : LPSTR -> "sptr"
; name_size : UINT_PTR* in/out -> "sptr"
; value : LPSTR -> "sptr"
; value_size : UINT_PTR* in/out -> "sptr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。出力引数:
#uselib "MSAJApi.dll" #func global alljoyn_interfacedescription_property_getannotationatindex "alljoyn_interfacedescription_property_getannotationatindex" int, sptr, str, var, str, var ; alljoyn_interfacedescription_property_getannotationatindex property, index, name, name_size, value, value_size ; property : alljoyn_interfacedescription_property -> "int" ; index : UINT_PTR -> "sptr" ; name : LPSTR -> "str" ; name_size : UINT_PTR* in/out -> "var" ; value : LPSTR -> "str" ; value_size : UINT_PTR* in/out -> "var" ; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。 ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "MSAJApi.dll" #func global alljoyn_interfacedescription_property_getannotationatindex "alljoyn_interfacedescription_property_getannotationatindex" int, sptr, str, sptr, str, sptr ; alljoyn_interfacedescription_property_getannotationatindex property, index, name, varptr(name_size), value, varptr(value_size) ; property : alljoyn_interfacedescription_property -> "int" ; index : UINT_PTR -> "sptr" ; name : LPSTR -> "str" ; name_size : UINT_PTR* in/out -> "sptr" ; value : LPSTR -> "str" ; value_size : UINT_PTR* in/out -> "sptr" ; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void alljoyn_interfacedescription_property_getannotationatindex(alljoyn_interfacedescription_property property, UINT_PTR index, LPSTR name, UINT_PTR* name_size, LPSTR value, UINT_PTR* value_size) #uselib "MSAJApi.dll" #func global alljoyn_interfacedescription_property_getannotationatindex "alljoyn_interfacedescription_property_getannotationatindex" int, intptr, str, var, str, var ; alljoyn_interfacedescription_property_getannotationatindex property, index, name, name_size, value, value_size ; property : alljoyn_interfacedescription_property -> "int" ; index : UINT_PTR -> "intptr" ; name : LPSTR -> "str" ; name_size : UINT_PTR* in/out -> "var" ; value : LPSTR -> "str" ; value_size : UINT_PTR* in/out -> "var" ; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。 ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void alljoyn_interfacedescription_property_getannotationatindex(alljoyn_interfacedescription_property property, UINT_PTR index, LPSTR name, UINT_PTR* name_size, LPSTR value, UINT_PTR* value_size) #uselib "MSAJApi.dll" #func global alljoyn_interfacedescription_property_getannotationatindex "alljoyn_interfacedescription_property_getannotationatindex" int, intptr, str, intptr, str, intptr ; alljoyn_interfacedescription_property_getannotationatindex property, index, name, varptr(name_size), value, varptr(value_size) ; property : alljoyn_interfacedescription_property -> "int" ; index : UINT_PTR -> "intptr" ; name : LPSTR -> "str" ; name_size : UINT_PTR* in/out -> "intptr" ; value : LPSTR -> "str" ; value_size : UINT_PTR* in/out -> "intptr" ; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。 ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_interfacedescription_property_getannotationatindex = msajapi.NewProc("alljoyn_interfacedescription_property_getannotationatindex")
)
// property (alljoyn_interfacedescription_property), index (UINT_PTR), name (LPSTR), name_size (UINT_PTR* in/out), value (LPSTR), value_size (UINT_PTR* in/out)
r1, _, err := procalljoyn_interfacedescription_property_getannotationatindex.Call(
uintptr(property),
uintptr(index),
uintptr(unsafe.Pointer(windows.BytePtrFromString(name))),
uintptr(name_size),
uintptr(unsafe.Pointer(windows.BytePtrFromString(value))),
uintptr(value_size),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure alljoyn_interfacedescription_property_getannotationatindex(
property: alljoyn_interfacedescription_property; // alljoyn_interfacedescription_property
index: NativeUInt; // UINT_PTR
name: PAnsiChar; // LPSTR
name_size: Pointer; // UINT_PTR* in/out
value: PAnsiChar; // LPSTR
value_size: Pointer // UINT_PTR* in/out
); stdcall;
external 'MSAJApi.dll' name 'alljoyn_interfacedescription_property_getannotationatindex';result := DllCall("MSAJApi\alljoyn_interfacedescription_property_getannotationatindex"
, "Ptr", property ; alljoyn_interfacedescription_property
, "UPtr", index ; UINT_PTR
, "AStr", name ; LPSTR
, "Ptr", name_size ; UINT_PTR* in/out
, "AStr", value ; LPSTR
, "Ptr", value_size ; UINT_PTR* in/out
, "Int") ; return: void●alljoyn_interfacedescription_property_getannotationatindex(property, index, name, name_size, value, value_size) = DLL("MSAJApi.dll", "int alljoyn_interfacedescription_property_getannotationatindex(void*, int, char*, void*, char*, void*)")
# 呼び出し: alljoyn_interfacedescription_property_getannotationatindex(property, index, name, name_size, value, value_size)
# property : alljoyn_interfacedescription_property -> "void*"
# index : UINT_PTR -> "int"
# name : LPSTR -> "char*"
# name_size : UINT_PTR* in/out -> "void*"
# value : LPSTR -> "char*"
# value_size : UINT_PTR* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。