ホーム › NetworkManagement.P2P › PeerDistRegisterForStatusChangeNotificationEx
PeerDistRegisterForStatusChangeNotificationEx
関数PeerDist(BranchCache)の状態変更通知を完了ポート経由で登録する。
シグネチャ
// PeerDist.dll
#include <windows.h>
DWORD PeerDistRegisterForStatusChangeNotificationEx(
INT_PTR hPeerDist,
HANDLE hCompletionPort, // optional
UINT_PTR ulCompletionKey, // optional
OVERLAPPED* lpOverlapped,
PEERDIST_STATUS_INFO* pPeerDistStatus
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| hPeerDist | INT_PTR | in | 対象のPeerDistセッションのハンドル。 |
| hCompletionPort | HANDLE | inoptional | 状態変化通知を受け取る完了ポートのハンドル。 |
| ulCompletionKey | UINT_PTR | inoptional | 完了パケットに関連付ける完了キー。 |
| lpOverlapped | OVERLAPPED* | in | 非同期通知に使用するOVERLAPPED構造体へのポインタ。 |
| pPeerDistStatus | PEERDIST_STATUS_INFO* | inout | 変化後の拡張状態を受け取るPEERDIST_STATUS_INFO構造体へのポインタ。 |
戻り値の型: DWORD
各言語での呼び出し定義
// PeerDist.dll
#include <windows.h>
DWORD PeerDistRegisterForStatusChangeNotificationEx(
INT_PTR hPeerDist,
HANDLE hCompletionPort, // optional
UINT_PTR ulCompletionKey, // optional
OVERLAPPED* lpOverlapped,
PEERDIST_STATUS_INFO* pPeerDistStatus
);[DllImport("PeerDist.dll", ExactSpelling = true)]
static extern uint PeerDistRegisterForStatusChangeNotificationEx(
IntPtr hPeerDist, // INT_PTR
IntPtr hCompletionPort, // HANDLE optional
UIntPtr ulCompletionKey, // UINT_PTR optional
IntPtr lpOverlapped, // OVERLAPPED*
IntPtr pPeerDistStatus // PEERDIST_STATUS_INFO* in/out
);<DllImport("PeerDist.dll", ExactSpelling:=True)>
Public Shared Function PeerDistRegisterForStatusChangeNotificationEx(
hPeerDist As IntPtr, ' INT_PTR
hCompletionPort As IntPtr, ' HANDLE optional
ulCompletionKey As UIntPtr, ' UINT_PTR optional
lpOverlapped As IntPtr, ' OVERLAPPED*
pPeerDistStatus As IntPtr ' PEERDIST_STATUS_INFO* in/out
) As UInteger
End Function' hPeerDist : INT_PTR
' hCompletionPort : HANDLE optional
' ulCompletionKey : UINT_PTR optional
' lpOverlapped : OVERLAPPED*
' pPeerDistStatus : PEERDIST_STATUS_INFO* in/out
Declare PtrSafe Function PeerDistRegisterForStatusChangeNotificationEx Lib "peerdist" ( _
ByVal hPeerDist As LongPtr, _
ByVal hCompletionPort As LongPtr, _
ByVal ulCompletionKey As LongPtr, _
ByVal lpOverlapped As LongPtr, _
ByVal pPeerDistStatus As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PeerDistRegisterForStatusChangeNotificationEx = ctypes.windll.peerdist.PeerDistRegisterForStatusChangeNotificationEx
PeerDistRegisterForStatusChangeNotificationEx.restype = wintypes.DWORD
PeerDistRegisterForStatusChangeNotificationEx.argtypes = [
ctypes.c_ssize_t, # hPeerDist : INT_PTR
wintypes.HANDLE, # hCompletionPort : HANDLE optional
ctypes.c_size_t, # ulCompletionKey : UINT_PTR optional
ctypes.c_void_p, # lpOverlapped : OVERLAPPED*
ctypes.c_void_p, # pPeerDistStatus : PEERDIST_STATUS_INFO* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('PeerDist.dll')
PeerDistRegisterForStatusChangeNotificationEx = Fiddle::Function.new(
lib['PeerDistRegisterForStatusChangeNotificationEx'],
[
Fiddle::TYPE_INTPTR_T, # hPeerDist : INT_PTR
Fiddle::TYPE_VOIDP, # hCompletionPort : HANDLE optional
Fiddle::TYPE_UINTPTR_T, # ulCompletionKey : UINT_PTR optional
Fiddle::TYPE_VOIDP, # lpOverlapped : OVERLAPPED*
Fiddle::TYPE_VOIDP, # pPeerDistStatus : PEERDIST_STATUS_INFO* in/out
],
-Fiddle::TYPE_INT)#[link(name = "peerdist")]
extern "system" {
fn PeerDistRegisterForStatusChangeNotificationEx(
hPeerDist: isize, // INT_PTR
hCompletionPort: *mut core::ffi::c_void, // HANDLE optional
ulCompletionKey: usize, // UINT_PTR optional
lpOverlapped: *mut OVERLAPPED, // OVERLAPPED*
pPeerDistStatus: *mut PEERDIST_STATUS_INFO // PEERDIST_STATUS_INFO* in/out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("PeerDist.dll")]
public static extern uint PeerDistRegisterForStatusChangeNotificationEx(IntPtr hPeerDist, IntPtr hCompletionPort, UIntPtr ulCompletionKey, IntPtr lpOverlapped, IntPtr pPeerDistStatus);
"@
$api = Add-Type -MemberDefinition $sig -Name 'PeerDist_PeerDistRegisterForStatusChangeNotificationEx' -Namespace Win32 -PassThru
# $api::PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus)#uselib "PeerDist.dll"
#func global PeerDistRegisterForStatusChangeNotificationEx "PeerDistRegisterForStatusChangeNotificationEx" sptr, sptr, sptr, sptr, sptr
; PeerDistRegisterForStatusChangeNotificationEx hPeerDist, hCompletionPort, ulCompletionKey, varptr(lpOverlapped), varptr(pPeerDistStatus) ; 戻り値は stat
; hPeerDist : INT_PTR -> "sptr"
; hCompletionPort : HANDLE optional -> "sptr"
; ulCompletionKey : UINT_PTR optional -> "sptr"
; lpOverlapped : OVERLAPPED* -> "sptr"
; pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "PeerDist.dll" #cfunc global PeerDistRegisterForStatusChangeNotificationEx "PeerDistRegisterForStatusChangeNotificationEx" sptr, sptr, sptr, var, var ; res = PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus) ; hPeerDist : INT_PTR -> "sptr" ; hCompletionPort : HANDLE optional -> "sptr" ; ulCompletionKey : UINT_PTR optional -> "sptr" ; lpOverlapped : OVERLAPPED* -> "var" ; pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "PeerDist.dll" #cfunc global PeerDistRegisterForStatusChangeNotificationEx "PeerDistRegisterForStatusChangeNotificationEx" sptr, sptr, sptr, sptr, sptr ; res = PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, varptr(lpOverlapped), varptr(pPeerDistStatus)) ; hPeerDist : INT_PTR -> "sptr" ; hCompletionPort : HANDLE optional -> "sptr" ; ulCompletionKey : UINT_PTR optional -> "sptr" ; lpOverlapped : OVERLAPPED* -> "sptr" ; pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD PeerDistRegisterForStatusChangeNotificationEx(INT_PTR hPeerDist, HANDLE hCompletionPort, UINT_PTR ulCompletionKey, OVERLAPPED* lpOverlapped, PEERDIST_STATUS_INFO* pPeerDistStatus) #uselib "PeerDist.dll" #cfunc global PeerDistRegisterForStatusChangeNotificationEx "PeerDistRegisterForStatusChangeNotificationEx" intptr, intptr, intptr, var, var ; res = PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus) ; hPeerDist : INT_PTR -> "intptr" ; hCompletionPort : HANDLE optional -> "intptr" ; ulCompletionKey : UINT_PTR optional -> "intptr" ; lpOverlapped : OVERLAPPED* -> "var" ; pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD PeerDistRegisterForStatusChangeNotificationEx(INT_PTR hPeerDist, HANDLE hCompletionPort, UINT_PTR ulCompletionKey, OVERLAPPED* lpOverlapped, PEERDIST_STATUS_INFO* pPeerDistStatus) #uselib "PeerDist.dll" #cfunc global PeerDistRegisterForStatusChangeNotificationEx "PeerDistRegisterForStatusChangeNotificationEx" intptr, intptr, intptr, intptr, intptr ; res = PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, varptr(lpOverlapped), varptr(pPeerDistStatus)) ; hPeerDist : INT_PTR -> "intptr" ; hCompletionPort : HANDLE optional -> "intptr" ; ulCompletionKey : UINT_PTR optional -> "intptr" ; lpOverlapped : OVERLAPPED* -> "intptr" ; pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
peerdist = windows.NewLazySystemDLL("PeerDist.dll")
procPeerDistRegisterForStatusChangeNotificationEx = peerdist.NewProc("PeerDistRegisterForStatusChangeNotificationEx")
)
// hPeerDist (INT_PTR), hCompletionPort (HANDLE optional), ulCompletionKey (UINT_PTR optional), lpOverlapped (OVERLAPPED*), pPeerDistStatus (PEERDIST_STATUS_INFO* in/out)
r1, _, err := procPeerDistRegisterForStatusChangeNotificationEx.Call(
uintptr(hPeerDist),
uintptr(hCompletionPort),
uintptr(ulCompletionKey),
uintptr(lpOverlapped),
uintptr(pPeerDistStatus),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction PeerDistRegisterForStatusChangeNotificationEx(
hPeerDist: NativeInt; // INT_PTR
hCompletionPort: THandle; // HANDLE optional
ulCompletionKey: NativeUInt; // UINT_PTR optional
lpOverlapped: Pointer; // OVERLAPPED*
pPeerDistStatus: Pointer // PEERDIST_STATUS_INFO* in/out
): DWORD; stdcall;
external 'PeerDist.dll' name 'PeerDistRegisterForStatusChangeNotificationEx';result := DllCall("PeerDist\PeerDistRegisterForStatusChangeNotificationEx"
, "Ptr", hPeerDist ; INT_PTR
, "Ptr", hCompletionPort ; HANDLE optional
, "UPtr", ulCompletionKey ; UINT_PTR optional
, "Ptr", lpOverlapped ; OVERLAPPED*
, "Ptr", pPeerDistStatus ; PEERDIST_STATUS_INFO* in/out
, "UInt") ; return: DWORD●PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus) = DLL("PeerDist.dll", "dword PeerDistRegisterForStatusChangeNotificationEx(int, void*, int, void*, void*)")
# 呼び出し: PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus)
# hPeerDist : INT_PTR -> "int"
# hCompletionPort : HANDLE optional -> "void*"
# ulCompletionKey : UINT_PTR optional -> "int"
# lpOverlapped : OVERLAPPED* -> "void*"
# pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "peerdist" fn PeerDistRegisterForStatusChangeNotificationEx(
hPeerDist: isize, // INT_PTR
hCompletionPort: ?*anyopaque, // HANDLE optional
ulCompletionKey: usize, // UINT_PTR optional
lpOverlapped: [*c]OVERLAPPED, // OVERLAPPED*
pPeerDistStatus: [*c]PEERDIST_STATUS_INFO // PEERDIST_STATUS_INFO* in/out
) callconv(std.os.windows.WINAPI) u32;proc PeerDistRegisterForStatusChangeNotificationEx(
hPeerDist: int, # INT_PTR
hCompletionPort: pointer, # HANDLE optional
ulCompletionKey: uint, # UINT_PTR optional
lpOverlapped: ptr OVERLAPPED, # OVERLAPPED*
pPeerDistStatus: ptr PEERDIST_STATUS_INFO # PEERDIST_STATUS_INFO* in/out
): uint32 {.importc: "PeerDistRegisterForStatusChangeNotificationEx", stdcall, dynlib: "PeerDist.dll".}pragma(lib, "peerdist");
extern(Windows)
uint PeerDistRegisterForStatusChangeNotificationEx(
ptrdiff_t hPeerDist, // INT_PTR
void* hCompletionPort, // HANDLE optional
size_t ulCompletionKey, // UINT_PTR optional
OVERLAPPED* lpOverlapped, // OVERLAPPED*
PEERDIST_STATUS_INFO* pPeerDistStatus // PEERDIST_STATUS_INFO* in/out
);ccall((:PeerDistRegisterForStatusChangeNotificationEx, "PeerDist.dll"), stdcall, UInt32,
(Int, Ptr{Cvoid}, Csize_t, Ptr{OVERLAPPED}, Ptr{PEERDIST_STATUS_INFO}),
hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus)
# hPeerDist : INT_PTR -> Int
# hCompletionPort : HANDLE optional -> Ptr{Cvoid}
# ulCompletionKey : UINT_PTR optional -> Csize_t
# lpOverlapped : OVERLAPPED* -> Ptr{OVERLAPPED}
# pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> Ptr{PEERDIST_STATUS_INFO}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
uint32_t PeerDistRegisterForStatusChangeNotificationEx(
intptr_t hPeerDist,
void* hCompletionPort,
uintptr_t ulCompletionKey,
void* lpOverlapped,
void* pPeerDistStatus);
]]
local peerdist = ffi.load("peerdist")
-- peerdist.PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus)
-- hPeerDist : INT_PTR
-- hCompletionPort : HANDLE optional
-- ulCompletionKey : UINT_PTR optional
-- lpOverlapped : OVERLAPPED*
-- pPeerDistStatus : PEERDIST_STATUS_INFO* in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('PeerDist.dll');
const PeerDistRegisterForStatusChangeNotificationEx = lib.func('__stdcall', 'PeerDistRegisterForStatusChangeNotificationEx', 'uint32_t', ['intptr_t', 'void *', 'uintptr_t', 'void *', 'void *']);
// PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus)
// hPeerDist : INT_PTR -> 'intptr_t'
// hCompletionPort : HANDLE optional -> 'void *'
// ulCompletionKey : UINT_PTR optional -> 'uintptr_t'
// lpOverlapped : OVERLAPPED* -> 'void *'
// pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("PeerDist.dll", {
PeerDistRegisterForStatusChangeNotificationEx: { parameters: ["isize", "pointer", "usize", "pointer", "pointer"], result: "u32" },
});
// lib.symbols.PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus)
// hPeerDist : INT_PTR -> "isize"
// hCompletionPort : HANDLE optional -> "pointer"
// ulCompletionKey : UINT_PTR optional -> "usize"
// lpOverlapped : OVERLAPPED* -> "pointer"
// pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t PeerDistRegisterForStatusChangeNotificationEx(
intptr_t hPeerDist,
void* hCompletionPort,
size_t ulCompletionKey,
void* lpOverlapped,
void* pPeerDistStatus);
C, "PeerDist.dll");
// $ffi->PeerDistRegisterForStatusChangeNotificationEx(hPeerDist, hCompletionPort, ulCompletionKey, lpOverlapped, pPeerDistStatus);
// hPeerDist : INT_PTR
// hCompletionPort : HANDLE optional
// ulCompletionKey : UINT_PTR optional
// lpOverlapped : OVERLAPPED*
// pPeerDistStatus : PEERDIST_STATUS_INFO* in/out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Peerdist extends StdCallLibrary {
Peerdist INSTANCE = Native.load("peerdist", Peerdist.class);
int PeerDistRegisterForStatusChangeNotificationEx(
long hPeerDist, // INT_PTR
Pointer hCompletionPort, // HANDLE optional
long ulCompletionKey, // UINT_PTR optional
Pointer lpOverlapped, // OVERLAPPED*
Pointer pPeerDistStatus // PEERDIST_STATUS_INFO* in/out
);
}@[Link("peerdist")]
lib LibPeerDist
fun PeerDistRegisterForStatusChangeNotificationEx = PeerDistRegisterForStatusChangeNotificationEx(
hPeerDist : LibC::SSizeT, # INT_PTR
hCompletionPort : Void*, # HANDLE optional
ulCompletionKey : LibC::SizeT, # UINT_PTR optional
lpOverlapped : OVERLAPPED*, # OVERLAPPED*
pPeerDistStatus : PEERDIST_STATUS_INFO* # PEERDIST_STATUS_INFO* in/out
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef PeerDistRegisterForStatusChangeNotificationExNative = Uint32 Function(IntPtr, Pointer<Void>, UintPtr, Pointer<Void>, Pointer<Void>);
typedef PeerDistRegisterForStatusChangeNotificationExDart = int Function(int, Pointer<Void>, int, Pointer<Void>, Pointer<Void>);
final PeerDistRegisterForStatusChangeNotificationEx = DynamicLibrary.open('PeerDist.dll')
.lookupFunction<PeerDistRegisterForStatusChangeNotificationExNative, PeerDistRegisterForStatusChangeNotificationExDart>('PeerDistRegisterForStatusChangeNotificationEx');
// hPeerDist : INT_PTR -> IntPtr
// hCompletionPort : HANDLE optional -> Pointer<Void>
// ulCompletionKey : UINT_PTR optional -> UintPtr
// lpOverlapped : OVERLAPPED* -> Pointer<Void>
// pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function PeerDistRegisterForStatusChangeNotificationEx(
hPeerDist: NativeInt; // INT_PTR
hCompletionPort: THandle; // HANDLE optional
ulCompletionKey: NativeUInt; // UINT_PTR optional
lpOverlapped: Pointer; // OVERLAPPED*
pPeerDistStatus: Pointer // PEERDIST_STATUS_INFO* in/out
): DWORD; stdcall;
external 'PeerDist.dll' name 'PeerDistRegisterForStatusChangeNotificationEx';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "PeerDistRegisterForStatusChangeNotificationEx"
c_PeerDistRegisterForStatusChangeNotificationEx :: CIntPtr -> Ptr () -> CUIntPtr -> Ptr () -> Ptr () -> IO Word32
-- hPeerDist : INT_PTR -> CIntPtr
-- hCompletionPort : HANDLE optional -> Ptr ()
-- ulCompletionKey : UINT_PTR optional -> CUIntPtr
-- lpOverlapped : OVERLAPPED* -> Ptr ()
-- pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let peerdistregisterforstatuschangenotificationex =
foreign "PeerDistRegisterForStatusChangeNotificationEx"
(intptr_t @-> (ptr void) @-> size_t @-> (ptr void) @-> (ptr void) @-> returning uint32_t)
(* hPeerDist : INT_PTR -> intptr_t *)
(* hCompletionPort : HANDLE optional -> (ptr void) *)
(* ulCompletionKey : UINT_PTR optional -> size_t *)
(* lpOverlapped : OVERLAPPED* -> (ptr void) *)
(* pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library peerdist (t "PeerDist.dll"))
(cffi:use-foreign-library peerdist)
(cffi:defcfun ("PeerDistRegisterForStatusChangeNotificationEx" peer-dist-register-for-status-change-notification-ex :convention :stdcall) :uint32
(h-peer-dist :int64) ; INT_PTR
(h-completion-port :pointer) ; HANDLE optional
(ul-completion-key :uint64) ; UINT_PTR optional
(lp-overlapped :pointer) ; OVERLAPPED*
(p-peer-dist-status :pointer)) ; PEERDIST_STATUS_INFO* in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $PeerDistRegisterForStatusChangeNotificationEx = Win32::API::More->new('PeerDist',
'DWORD PeerDistRegisterForStatusChangeNotificationEx(LPARAM hPeerDist, HANDLE hCompletionPort, WPARAM ulCompletionKey, LPVOID lpOverlapped, LPVOID pPeerDistStatus)');
# my $ret = $PeerDistRegisterForStatusChangeNotificationEx->Call($hPeerDist, $hCompletionPort, $ulCompletionKey, $lpOverlapped, $pPeerDistStatus);
# hPeerDist : INT_PTR -> LPARAM
# hCompletionPort : HANDLE optional -> HANDLE
# ulCompletionKey : UINT_PTR optional -> WPARAM
# lpOverlapped : OVERLAPPED* -> LPVOID
# pPeerDistStatus : PEERDIST_STATUS_INFO* in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
類似 API
- f PeerDistRegisterForStatusChangeNotification — ピア配信の状態変化通知を登録する。