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