Win32 API 日本語リファレンス
ホームNetworkManagement.P2P › PeerCollabDeleteEndpointData

PeerCollabDeleteEndpointData

関数
保存済みのエンドポイントデータを削除する。
DLLP2P.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

HRESULT PeerCollabDeleteEndpointData(
    PEER_ENDPOINT* pcEndpoint
);

パラメーター

名前方向
pcEndpointPEER_ENDPOINT*in

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT PeerCollabDeleteEndpointData(
    PEER_ENDPOINT* pcEndpoint
);
[DllImport("P2P.dll", ExactSpelling = true)]
static extern int PeerCollabDeleteEndpointData(
    IntPtr pcEndpoint   // PEER_ENDPOINT*
);
<DllImport("P2P.dll", ExactSpelling:=True)>
Public Shared Function PeerCollabDeleteEndpointData(
    pcEndpoint As IntPtr   ' PEER_ENDPOINT*
) As Integer
End Function
' pcEndpoint : PEER_ENDPOINT*
Declare PtrSafe Function PeerCollabDeleteEndpointData Lib "p2p" ( _
    ByVal pcEndpoint As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

PeerCollabDeleteEndpointData = ctypes.windll.p2p.PeerCollabDeleteEndpointData
PeerCollabDeleteEndpointData.restype = ctypes.c_int
PeerCollabDeleteEndpointData.argtypes = [
    ctypes.c_void_p,  # pcEndpoint : PEER_ENDPOINT*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('P2P.dll')
PeerCollabDeleteEndpointData = Fiddle::Function.new(
  lib['PeerCollabDeleteEndpointData'],
  [
    Fiddle::TYPE_VOIDP,  # pcEndpoint : PEER_ENDPOINT*
  ],
  Fiddle::TYPE_INT)
#[link(name = "p2p")]
extern "system" {
    fn PeerCollabDeleteEndpointData(
        pcEndpoint: *mut PEER_ENDPOINT  // PEER_ENDPOINT*
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("P2P.dll")]
public static extern int PeerCollabDeleteEndpointData(IntPtr pcEndpoint);
"@
$api = Add-Type -MemberDefinition $sig -Name 'P2P_PeerCollabDeleteEndpointData' -Namespace Win32 -PassThru
# $api::PeerCollabDeleteEndpointData(pcEndpoint)
#uselib "P2P.dll"
#func global PeerCollabDeleteEndpointData "PeerCollabDeleteEndpointData" sptr
; PeerCollabDeleteEndpointData varptr(pcEndpoint)   ; 戻り値は stat
; pcEndpoint : PEER_ENDPOINT* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "P2P.dll"
#cfunc global PeerCollabDeleteEndpointData "PeerCollabDeleteEndpointData" var
; res = PeerCollabDeleteEndpointData(pcEndpoint)
; pcEndpoint : PEER_ENDPOINT* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HRESULT PeerCollabDeleteEndpointData(PEER_ENDPOINT* pcEndpoint)
#uselib "P2P.dll"
#cfunc global PeerCollabDeleteEndpointData "PeerCollabDeleteEndpointData" var
; res = PeerCollabDeleteEndpointData(pcEndpoint)
; pcEndpoint : PEER_ENDPOINT* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	p2p = windows.NewLazySystemDLL("P2P.dll")
	procPeerCollabDeleteEndpointData = p2p.NewProc("PeerCollabDeleteEndpointData")
)

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