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