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

alljoyn_interfacedescription_setargdescriptionforlanguage

関数
指定言語向けにメンバー引数の説明文を設定する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

QStatus alljoyn_interfacedescription_setargdescriptionforlanguage(
    alljoyn_interfacedescription iface,
    LPCSTR member,
    LPCSTR arg,
    LPCSTR description,
    LPCSTR languageTag
);

パラメーター

名前方向
ifacealljoyn_interfacedescriptionin
memberLPCSTRin
argLPCSTRin
descriptionLPCSTRin
languageTagLPCSTRin

戻り値の型: QStatus

各言語での呼び出し定義

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

QStatus alljoyn_interfacedescription_setargdescriptionforlanguage(
    alljoyn_interfacedescription iface,
    LPCSTR member,
    LPCSTR arg,
    LPCSTR description,
    LPCSTR languageTag
);
[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern int alljoyn_interfacedescription_setargdescriptionforlanguage(
    IntPtr iface,   // alljoyn_interfacedescription
    [MarshalAs(UnmanagedType.LPStr)] string member,   // LPCSTR
    [MarshalAs(UnmanagedType.LPStr)] string arg,   // LPCSTR
    [MarshalAs(UnmanagedType.LPStr)] string description,   // LPCSTR
    [MarshalAs(UnmanagedType.LPStr)] string languageTag   // LPCSTR
);
<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_interfacedescription_setargdescriptionforlanguage(
    iface As IntPtr,   ' alljoyn_interfacedescription
    <MarshalAs(UnmanagedType.LPStr)> member As String,   ' LPCSTR
    <MarshalAs(UnmanagedType.LPStr)> arg As String,   ' LPCSTR
    <MarshalAs(UnmanagedType.LPStr)> description As String,   ' LPCSTR
    <MarshalAs(UnmanagedType.LPStr)> languageTag As String   ' LPCSTR
) As Integer
End Function
' iface : alljoyn_interfacedescription
' member : LPCSTR
' arg : LPCSTR
' description : LPCSTR
' languageTag : LPCSTR
Declare PtrSafe Function alljoyn_interfacedescription_setargdescriptionforlanguage Lib "msajapi" ( _
    ByVal iface As LongPtr, _
    ByVal member As String, _
    ByVal arg As String, _
    ByVal description As String, _
    ByVal languageTag As String) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

alljoyn_interfacedescription_setargdescriptionforlanguage = ctypes.windll.msajapi.alljoyn_interfacedescription_setargdescriptionforlanguage
alljoyn_interfacedescription_setargdescriptionforlanguage.restype = ctypes.c_int
alljoyn_interfacedescription_setargdescriptionforlanguage.argtypes = [
    ctypes.c_ssize_t,  # iface : alljoyn_interfacedescription
    wintypes.LPCSTR,  # member : LPCSTR
    wintypes.LPCSTR,  # arg : LPCSTR
    wintypes.LPCSTR,  # description : LPCSTR
    wintypes.LPCSTR,  # languageTag : LPCSTR
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_interfacedescription_setargdescriptionforlanguage = Fiddle::Function.new(
  lib['alljoyn_interfacedescription_setargdescriptionforlanguage'],
  [
    Fiddle::TYPE_INTPTR_T,  # iface : alljoyn_interfacedescription
    Fiddle::TYPE_VOIDP,  # member : LPCSTR
    Fiddle::TYPE_VOIDP,  # arg : LPCSTR
    Fiddle::TYPE_VOIDP,  # description : LPCSTR
    Fiddle::TYPE_VOIDP,  # languageTag : LPCSTR
  ],
  Fiddle::TYPE_INT)
#[link(name = "msajapi")]
extern "system" {
    fn alljoyn_interfacedescription_setargdescriptionforlanguage(
        iface: isize,  // alljoyn_interfacedescription
        member: *const u8,  // LPCSTR
        arg: *const u8,  // LPCSTR
        description: *const u8,  // LPCSTR
        languageTag: *const u8  // LPCSTR
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSAJApi.dll")]
public static extern int alljoyn_interfacedescription_setargdescriptionforlanguage(IntPtr iface, [MarshalAs(UnmanagedType.LPStr)] string member, [MarshalAs(UnmanagedType.LPStr)] string arg, [MarshalAs(UnmanagedType.LPStr)] string description, [MarshalAs(UnmanagedType.LPStr)] string languageTag);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_interfacedescription_setargdescriptionforlanguage' -Namespace Win32 -PassThru
# $api::alljoyn_interfacedescription_setargdescriptionforlanguage(iface, member, arg, description, languageTag)
#uselib "MSAJApi.dll"
#func global alljoyn_interfacedescription_setargdescriptionforlanguage "alljoyn_interfacedescription_setargdescriptionforlanguage" sptr, sptr, sptr, sptr, sptr
; alljoyn_interfacedescription_setargdescriptionforlanguage iface, member, arg, description, languageTag   ; 戻り値は stat
; iface : alljoyn_interfacedescription -> "sptr"
; member : LPCSTR -> "sptr"
; arg : LPCSTR -> "sptr"
; description : LPCSTR -> "sptr"
; languageTag : LPCSTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MSAJApi.dll"
#cfunc global alljoyn_interfacedescription_setargdescriptionforlanguage "alljoyn_interfacedescription_setargdescriptionforlanguage" sptr, str, str, str, str
; res = alljoyn_interfacedescription_setargdescriptionforlanguage(iface, member, arg, description, languageTag)
; iface : alljoyn_interfacedescription -> "sptr"
; member : LPCSTR -> "str"
; arg : LPCSTR -> "str"
; description : LPCSTR -> "str"
; languageTag : LPCSTR -> "str"
; QStatus alljoyn_interfacedescription_setargdescriptionforlanguage(alljoyn_interfacedescription iface, LPCSTR member, LPCSTR arg, LPCSTR description, LPCSTR languageTag)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_interfacedescription_setargdescriptionforlanguage "alljoyn_interfacedescription_setargdescriptionforlanguage" intptr, str, str, str, str
; res = alljoyn_interfacedescription_setargdescriptionforlanguage(iface, member, arg, description, languageTag)
; iface : alljoyn_interfacedescription -> "intptr"
; member : LPCSTR -> "str"
; arg : LPCSTR -> "str"
; description : LPCSTR -> "str"
; languageTag : LPCSTR -> "str"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_interfacedescription_setargdescriptionforlanguage = msajapi.NewProc("alljoyn_interfacedescription_setargdescriptionforlanguage")
)

// iface (alljoyn_interfacedescription), member (LPCSTR), arg (LPCSTR), description (LPCSTR), languageTag (LPCSTR)
r1, _, err := procalljoyn_interfacedescription_setargdescriptionforlanguage.Call(
	uintptr(iface),
	uintptr(unsafe.Pointer(windows.BytePtrFromString(member))),
	uintptr(unsafe.Pointer(windows.BytePtrFromString(arg))),
	uintptr(unsafe.Pointer(windows.BytePtrFromString(description))),
	uintptr(unsafe.Pointer(windows.BytePtrFromString(languageTag))),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // QStatus
function alljoyn_interfacedescription_setargdescriptionforlanguage(
  iface: NativeInt;   // alljoyn_interfacedescription
  member: PAnsiChar;   // LPCSTR
  arg: PAnsiChar;   // LPCSTR
  description: PAnsiChar;   // LPCSTR
  languageTag: PAnsiChar   // LPCSTR
): Integer; stdcall;
  external 'MSAJApi.dll' name 'alljoyn_interfacedescription_setargdescriptionforlanguage';
result := DllCall("MSAJApi\alljoyn_interfacedescription_setargdescriptionforlanguage"
    , "Ptr", iface   ; alljoyn_interfacedescription
    , "AStr", member   ; LPCSTR
    , "AStr", arg   ; LPCSTR
    , "AStr", description   ; LPCSTR
    , "AStr", languageTag   ; LPCSTR
    , "Int")   ; return: QStatus
●alljoyn_interfacedescription_setargdescriptionforlanguage(iface, member, arg, description, languageTag) = DLL("MSAJApi.dll", "int alljoyn_interfacedescription_setargdescriptionforlanguage(int, char*, char*, char*, char*)")
# 呼び出し: alljoyn_interfacedescription_setargdescriptionforlanguage(iface, member, arg, description, languageTag)
# iface : alljoyn_interfacedescription -> "int"
# member : LPCSTR -> "char*"
# arg : LPCSTR -> "char*"
# description : LPCSTR -> "char*"
# languageTag : LPCSTR -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。