ホーム › NetworkManagement.P2P › PeerDistShutdown
PeerDistShutdown
関数ピア配信機能を終了しハンドルを解放する。
シグネチャ
// PeerDist.dll
#include <windows.h>
DWORD PeerDistShutdown(
INT_PTR hPeerDist
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hPeerDist | INT_PTR | in |
戻り値の型: DWORD
各言語での呼び出し定義
// PeerDist.dll
#include <windows.h>
DWORD PeerDistShutdown(
INT_PTR hPeerDist
);[DllImport("PeerDist.dll", ExactSpelling = true)]
static extern uint PeerDistShutdown(
IntPtr hPeerDist // INT_PTR
);<DllImport("PeerDist.dll", ExactSpelling:=True)>
Public Shared Function PeerDistShutdown(
hPeerDist As IntPtr ' INT_PTR
) As UInteger
End Function' hPeerDist : INT_PTR
Declare PtrSafe Function PeerDistShutdown Lib "peerdist" ( _
ByVal hPeerDist As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PeerDistShutdown = ctypes.windll.peerdist.PeerDistShutdown
PeerDistShutdown.restype = wintypes.DWORD
PeerDistShutdown.argtypes = [
ctypes.c_ssize_t, # hPeerDist : INT_PTR
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('PeerDist.dll')
PeerDistShutdown = Fiddle::Function.new(
lib['PeerDistShutdown'],
[
Fiddle::TYPE_INTPTR_T, # hPeerDist : INT_PTR
],
-Fiddle::TYPE_INT)#[link(name = "peerdist")]
extern "system" {
fn PeerDistShutdown(
hPeerDist: isize // INT_PTR
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("PeerDist.dll")]
public static extern uint PeerDistShutdown(IntPtr hPeerDist);
"@
$api = Add-Type -MemberDefinition $sig -Name 'PeerDist_PeerDistShutdown' -Namespace Win32 -PassThru
# $api::PeerDistShutdown(hPeerDist)#uselib "PeerDist.dll"
#func global PeerDistShutdown "PeerDistShutdown" sptr
; PeerDistShutdown hPeerDist ; 戻り値は stat
; hPeerDist : INT_PTR -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "PeerDist.dll"
#cfunc global PeerDistShutdown "PeerDistShutdown" sptr
; res = PeerDistShutdown(hPeerDist)
; hPeerDist : INT_PTR -> "sptr"; DWORD PeerDistShutdown(INT_PTR hPeerDist)
#uselib "PeerDist.dll"
#cfunc global PeerDistShutdown "PeerDistShutdown" intptr
; res = PeerDistShutdown(hPeerDist)
; hPeerDist : INT_PTR -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
peerdist = windows.NewLazySystemDLL("PeerDist.dll")
procPeerDistShutdown = peerdist.NewProc("PeerDistShutdown")
)
// hPeerDist (INT_PTR)
r1, _, err := procPeerDistShutdown.Call(
uintptr(hPeerDist),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction PeerDistShutdown(
hPeerDist: NativeInt // INT_PTR
): DWORD; stdcall;
external 'PeerDist.dll' name 'PeerDistShutdown';result := DllCall("PeerDist\PeerDistShutdown"
, "Ptr", hPeerDist ; INT_PTR
, "UInt") ; return: DWORD●PeerDistShutdown(hPeerDist) = DLL("PeerDist.dll", "dword PeerDistShutdown(int)")
# 呼び出し: PeerDistShutdown(hPeerDist)
# hPeerDist : INT_PTR -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。