Win32 API 日本語リファレンス
ホームSystem.DeploymentServices › WdsTransportClientCompleteReceive

WdsTransportClientCompleteReceive

関数
WDSトランスポートクライアントの受信処理完了を通知する。
DLLWDSTPTC.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

DWORD WdsTransportClientCompleteReceive(
    HANDLE hSessionKey,
    DWORD ulSize,
    ULONGLONG* pullOffset
);

パラメーター

名前方向
hSessionKeyHANDLEin
ulSizeDWORDin
pullOffsetULONGLONG*in

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD WdsTransportClientCompleteReceive(
    HANDLE hSessionKey,
    DWORD ulSize,
    ULONGLONG* pullOffset
);
[DllImport("WDSTPTC.dll", ExactSpelling = true)]
static extern uint WdsTransportClientCompleteReceive(
    IntPtr hSessionKey,   // HANDLE
    uint ulSize,   // DWORD
    ref ulong pullOffset   // ULONGLONG*
);
<DllImport("WDSTPTC.dll", ExactSpelling:=True)>
Public Shared Function WdsTransportClientCompleteReceive(
    hSessionKey As IntPtr,   ' HANDLE
    ulSize As UInteger,   ' DWORD
    ByRef pullOffset As ULong   ' ULONGLONG*
) As UInteger
End Function
' hSessionKey : HANDLE
' ulSize : DWORD
' pullOffset : ULONGLONG*
Declare PtrSafe Function WdsTransportClientCompleteReceive Lib "wdstptc" ( _
    ByVal hSessionKey As LongPtr, _
    ByVal ulSize As Long, _
    ByRef pullOffset As LongLong) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

WdsTransportClientCompleteReceive = ctypes.windll.wdstptc.WdsTransportClientCompleteReceive
WdsTransportClientCompleteReceive.restype = wintypes.DWORD
WdsTransportClientCompleteReceive.argtypes = [
    wintypes.HANDLE,  # hSessionKey : HANDLE
    wintypes.DWORD,  # ulSize : DWORD
    ctypes.POINTER(ctypes.c_ulonglong),  # pullOffset : ULONGLONG*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	wdstptc = windows.NewLazySystemDLL("WDSTPTC.dll")
	procWdsTransportClientCompleteReceive = wdstptc.NewProc("WdsTransportClientCompleteReceive")
)

// hSessionKey (HANDLE), ulSize (DWORD), pullOffset (ULONGLONG*)
r1, _, err := procWdsTransportClientCompleteReceive.Call(
	uintptr(hSessionKey),
	uintptr(ulSize),
	uintptr(pullOffset),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function WdsTransportClientCompleteReceive(
  hSessionKey: THandle;   // HANDLE
  ulSize: DWORD;   // DWORD
  pullOffset: Pointer   // ULONGLONG*
): DWORD; stdcall;
  external 'WDSTPTC.dll' name 'WdsTransportClientCompleteReceive';
result := DllCall("WDSTPTC\WdsTransportClientCompleteReceive"
    , "Ptr", hSessionKey   ; HANDLE
    , "UInt", ulSize   ; DWORD
    , "Ptr", pullOffset   ; ULONGLONG*
    , "UInt")   ; return: DWORD
●WdsTransportClientCompleteReceive(hSessionKey, ulSize, pullOffset) = DLL("WDSTPTC.dll", "dword WdsTransportClientCompleteReceive(void*, dword, void*)")
# 呼び出し: WdsTransportClientCompleteReceive(hSessionKey, ulSize, pullOffset)
# hSessionKey : HANDLE -> "void*"
# ulSize : DWORD -> "dword"
# pullOffset : ULONGLONG* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。