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