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