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

alljoyn_sessionopts_get_transports

関数
セッションオプションのトランスポート種別を取得する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

WORD alljoyn_sessionopts_get_transports(
    alljoyn_sessionopts opts
);

パラメーター

名前方向
optsalljoyn_sessionoptsin

戻り値の型: WORD

各言語での呼び出し定義

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

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

alljoyn_sessionopts_get_transports = ctypes.windll.msajapi.alljoyn_sessionopts_get_transports
alljoyn_sessionopts_get_transports.restype = ctypes.c_ushort
alljoyn_sessionopts_get_transports.argtypes = [
    ctypes.c_ssize_t,  # opts : alljoyn_sessionopts
]
require 'fiddle'
require 'fiddle/import'

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

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_sessionopts_get_transports = msajapi.NewProc("alljoyn_sessionopts_get_transports")
)

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