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