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