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

alljoyn_autopinger_create

関数
宛先を定期pingする自動pinger を生成する。
DLLMSAJApi.dll呼出規約winapi

シグネチャ

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

alljoyn_autopinger alljoyn_autopinger_create(
    alljoyn_busattachment bus
);

パラメーター

名前方向
busalljoyn_busattachmentin

戻り値の型: alljoyn_autopinger

各言語での呼び出し定義

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

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

alljoyn_autopinger_create = ctypes.windll.msajapi.alljoyn_autopinger_create
alljoyn_autopinger_create.restype = ctypes.c_ssize_t
alljoyn_autopinger_create.argtypes = [
    ctypes.c_ssize_t,  # bus : alljoyn_busattachment
]
require 'fiddle'
require 'fiddle/import'

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

var (
	msajapi = windows.NewLazySystemDLL("MSAJApi.dll")
	procalljoyn_autopinger_create = msajapi.NewProc("alljoyn_autopinger_create")
)

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