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