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

alljoyn_message_getdestination

関数
AllJoynメッセージの宛先名を取得する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

LPSTR alljoyn_message_getdestination(
    alljoyn_message msg
);

パラメーター

名前方向
msgalljoyn_messagein

戻り値の型: LPSTR

各言語での呼び出し定義

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

LPSTR alljoyn_message_getdestination(
    alljoyn_message msg
);
[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern IntPtr alljoyn_message_getdestination(
    IntPtr msg   // alljoyn_message
);
<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_message_getdestination(
    msg As IntPtr   ' alljoyn_message
) As IntPtr
End Function
' msg : alljoyn_message
Declare PtrSafe Function alljoyn_message_getdestination Lib "msajapi" ( _
    ByVal msg As LongPtr) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

alljoyn_message_getdestination = ctypes.windll.msajapi.alljoyn_message_getdestination
alljoyn_message_getdestination.restype = wintypes.LPSTR
alljoyn_message_getdestination.argtypes = [
    ctypes.c_ssize_t,  # msg : alljoyn_message
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_message_getdestination = Fiddle::Function.new(
  lib['alljoyn_message_getdestination'],
  [
    Fiddle::TYPE_INTPTR_T,  # msg : alljoyn_message
  ],
  Fiddle::TYPE_VOIDP)
#[link(name = "msajapi")]
extern "system" {
    fn alljoyn_message_getdestination(
        msg: isize  // alljoyn_message
    ) -> *mut u8;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSAJApi.dll")]
public static extern IntPtr alljoyn_message_getdestination(IntPtr msg);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_message_getdestination' -Namespace Win32 -PassThru
# $api::alljoyn_message_getdestination(msg)
#uselib "MSAJApi.dll"
#func global alljoyn_message_getdestination "alljoyn_message_getdestination" sptr
; alljoyn_message_getdestination msg   ; 戻り値は stat
; msg : alljoyn_message -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MSAJApi.dll"
#cfunc global alljoyn_message_getdestination "alljoyn_message_getdestination" sptr
; res = alljoyn_message_getdestination(msg)
; msg : alljoyn_message -> "sptr"
; LPSTR alljoyn_message_getdestination(alljoyn_message msg)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_message_getdestination "alljoyn_message_getdestination" intptr
; res = alljoyn_message_getdestination(msg)
; msg : alljoyn_message -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_message_getdestination = msajapi.NewProc("alljoyn_message_getdestination")
)

// msg (alljoyn_message)
r1, _, err := procalljoyn_message_getdestination.Call(
	uintptr(msg),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // LPSTR
function alljoyn_message_getdestination(
  msg: NativeInt   // alljoyn_message
): PAnsiChar; stdcall;
  external 'MSAJApi.dll' name 'alljoyn_message_getdestination';
result := DllCall("MSAJApi\alljoyn_message_getdestination"
    , "Ptr", msg   ; alljoyn_message
    , "Ptr")   ; return: LPSTR
●alljoyn_message_getdestination(msg) = DLL("MSAJApi.dll", "char* alljoyn_message_getdestination(int)")
# 呼び出し: alljoyn_message_getdestination(msg)
# msg : alljoyn_message -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。