ホーム › NetworkManagement.P2P › PeerCollabDeleteObject
PeerCollabDeleteObject
関数公開済みのコラボレーションオブジェクトを削除する。
シグネチャ
// P2P.dll
#include <windows.h>
HRESULT PeerCollabDeleteObject(
const GUID* pObjectId
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pObjectId | GUID* | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// P2P.dll
#include <windows.h>
HRESULT PeerCollabDeleteObject(
const GUID* pObjectId
);[DllImport("P2P.dll", ExactSpelling = true)]
static extern int PeerCollabDeleteObject(
ref Guid pObjectId // GUID*
);<DllImport("P2P.dll", ExactSpelling:=True)>
Public Shared Function PeerCollabDeleteObject(
ByRef pObjectId As Guid ' GUID*
) As Integer
End Function' pObjectId : GUID*
Declare PtrSafe Function PeerCollabDeleteObject Lib "p2p" ( _
ByVal pObjectId As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PeerCollabDeleteObject = ctypes.windll.p2p.PeerCollabDeleteObject
PeerCollabDeleteObject.restype = ctypes.c_int
PeerCollabDeleteObject.argtypes = [
ctypes.c_void_p, # pObjectId : GUID*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('P2P.dll')
PeerCollabDeleteObject = Fiddle::Function.new(
lib['PeerCollabDeleteObject'],
[
Fiddle::TYPE_VOIDP, # pObjectId : GUID*
],
Fiddle::TYPE_INT)#[link(name = "p2p")]
extern "system" {
fn PeerCollabDeleteObject(
pObjectId: *const GUID // GUID*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("P2P.dll")]
public static extern int PeerCollabDeleteObject(ref Guid pObjectId);
"@
$api = Add-Type -MemberDefinition $sig -Name 'P2P_PeerCollabDeleteObject' -Namespace Win32 -PassThru
# $api::PeerCollabDeleteObject(pObjectId)#uselib "P2P.dll"
#func global PeerCollabDeleteObject "PeerCollabDeleteObject" sptr
; PeerCollabDeleteObject varptr(pObjectId) ; 戻り値は stat
; pObjectId : GUID* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "P2P.dll" #cfunc global PeerCollabDeleteObject "PeerCollabDeleteObject" var ; res = PeerCollabDeleteObject(pObjectId) ; pObjectId : GUID* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "P2P.dll" #cfunc global PeerCollabDeleteObject "PeerCollabDeleteObject" sptr ; res = PeerCollabDeleteObject(varptr(pObjectId)) ; pObjectId : GUID* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT PeerCollabDeleteObject(GUID* pObjectId) #uselib "P2P.dll" #cfunc global PeerCollabDeleteObject "PeerCollabDeleteObject" var ; res = PeerCollabDeleteObject(pObjectId) ; pObjectId : GUID* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT PeerCollabDeleteObject(GUID* pObjectId) #uselib "P2P.dll" #cfunc global PeerCollabDeleteObject "PeerCollabDeleteObject" intptr ; res = PeerCollabDeleteObject(varptr(pObjectId)) ; pObjectId : GUID* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
p2p = windows.NewLazySystemDLL("P2P.dll")
procPeerCollabDeleteObject = p2p.NewProc("PeerCollabDeleteObject")
)
// pObjectId (GUID*)
r1, _, err := procPeerCollabDeleteObject.Call(
uintptr(pObjectId),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction PeerCollabDeleteObject(
pObjectId: PGUID // GUID*
): Integer; stdcall;
external 'P2P.dll' name 'PeerCollabDeleteObject';result := DllCall("P2P\PeerCollabDeleteObject"
, "Ptr", pObjectId ; GUID*
, "Int") ; return: HRESULT●PeerCollabDeleteObject(pObjectId) = DLL("P2P.dll", "int PeerCollabDeleteObject(void*)")
# 呼び出し: PeerCollabDeleteObject(pObjectId)
# pObjectId : GUID* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。