ホーム › Devices.AllJoyn › alljoyn_sessionopts_get_traffic
alljoyn_sessionopts_get_traffic
関数セッションオプションのトラフィック種別を取得する。
シグネチャ
// MSAJApi.dll
#include <windows.h>
BYTE alljoyn_sessionopts_get_traffic(
alljoyn_sessionopts opts
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| opts | alljoyn_sessionopts | in |
戻り値の型: BYTE
各言語での呼び出し定義
// MSAJApi.dll
#include <windows.h>
BYTE alljoyn_sessionopts_get_traffic(
alljoyn_sessionopts opts
);[DllImport("MSAJApi.dll", ExactSpelling = true)]
static extern byte alljoyn_sessionopts_get_traffic(
IntPtr opts // alljoyn_sessionopts
);<DllImport("MSAJApi.dll", ExactSpelling:=True)>
Public Shared Function alljoyn_sessionopts_get_traffic(
opts As IntPtr ' alljoyn_sessionopts
) As Byte
End Function' opts : alljoyn_sessionopts
Declare PtrSafe Function alljoyn_sessionopts_get_traffic Lib "msajapi" ( _
ByVal opts As LongPtr) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
alljoyn_sessionopts_get_traffic = ctypes.windll.msajapi.alljoyn_sessionopts_get_traffic
alljoyn_sessionopts_get_traffic.restype = ctypes.c_ubyte
alljoyn_sessionopts_get_traffic.argtypes = [
ctypes.c_ssize_t, # opts : alljoyn_sessionopts
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSAJApi.dll')
alljoyn_sessionopts_get_traffic = Fiddle::Function.new(
lib['alljoyn_sessionopts_get_traffic'],
[
Fiddle::TYPE_INTPTR_T, # opts : alljoyn_sessionopts
],
-Fiddle::TYPE_CHAR)#[link(name = "msajapi")]
extern "system" {
fn alljoyn_sessionopts_get_traffic(
opts: isize // alljoyn_sessionopts
) -> u8;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MSAJApi.dll")]
public static extern byte alljoyn_sessionopts_get_traffic(IntPtr opts);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSAJApi_alljoyn_sessionopts_get_traffic' -Namespace Win32 -PassThru
# $api::alljoyn_sessionopts_get_traffic(opts)#uselib "MSAJApi.dll"
#func global alljoyn_sessionopts_get_traffic "alljoyn_sessionopts_get_traffic" sptr
; alljoyn_sessionopts_get_traffic opts ; 戻り値は stat
; opts : alljoyn_sessionopts -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSAJApi.dll"
#cfunc global alljoyn_sessionopts_get_traffic "alljoyn_sessionopts_get_traffic" sptr
; res = alljoyn_sessionopts_get_traffic(opts)
; opts : alljoyn_sessionopts -> "sptr"; BYTE alljoyn_sessionopts_get_traffic(alljoyn_sessionopts opts)
#uselib "MSAJApi.dll"
#cfunc global alljoyn_sessionopts_get_traffic "alljoyn_sessionopts_get_traffic" intptr
; res = alljoyn_sessionopts_get_traffic(opts)
; opts : alljoyn_sessionopts -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
procalljoyn_sessionopts_get_traffic = msajapi.NewProc("alljoyn_sessionopts_get_traffic")
)
// opts (alljoyn_sessionopts)
r1, _, err := procalljoyn_sessionopts_get_traffic.Call(
uintptr(opts),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BYTEfunction alljoyn_sessionopts_get_traffic(
opts: NativeInt // alljoyn_sessionopts
): Byte; stdcall;
external 'MSAJApi.dll' name 'alljoyn_sessionopts_get_traffic';result := DllCall("MSAJApi\alljoyn_sessionopts_get_traffic"
, "Ptr", opts ; alljoyn_sessionopts
, "UChar") ; return: BYTE●alljoyn_sessionopts_get_traffic(opts) = DLL("MSAJApi.dll", "byte alljoyn_sessionopts_get_traffic(int)")
# 呼び出し: alljoyn_sessionopts_get_traffic(opts)
# opts : alljoyn_sessionopts -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。