Win32 API 日本語リファレンス
ホームNetworking.WindowsWebServices › WsCreateChannel

WsCreateChannel

関数
通信チャネルを作成する。
DLLwebservices.dll呼出規約winapi対応OSWindows 7 以降

シグネチャ

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

HRESULT WsCreateChannel(
    WS_CHANNEL_TYPE channelType,
    WS_CHANNEL_BINDING channelBinding,
    const WS_CHANNEL_PROPERTY* properties,   // optional
    DWORD propertyCount,
    const WS_SECURITY_DESCRIPTION* securityDescription,   // optional
    WS_CHANNEL** channel,
    WS_ERROR* error   // optional
);

パラメーター

名前方向説明
channelTypeWS_CHANNEL_TYPEin作成するチャネル種別(Duplex,Request等)を示す列挙値。
channelBindingWS_CHANNEL_BINDINGinトランスポート結合(HTTP,TCP,UDP,名前付きパイプ)を示す列挙値。
propertiesWS_CHANNEL_PROPERTY*inoptionalチャネルの構成プロパティ配列。NULL可。
propertyCountDWORDinproperties配列の要素数。
securityDescriptionWS_SECURITY_DESCRIPTION*inoptionalチャネルに適用するセキュリティ設定。不要ならNULL可。
channelWS_CHANNEL**out生成されたWS_CHANNELを受け取る出力ポインタ。
errorWS_ERROR*inoptional失敗時の追加エラー情報を格納するWS_ERRORオブジェクト。NULL可。

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT WsCreateChannel(
    WS_CHANNEL_TYPE channelType,
    WS_CHANNEL_BINDING channelBinding,
    const WS_CHANNEL_PROPERTY* properties,   // optional
    DWORD propertyCount,
    const WS_SECURITY_DESCRIPTION* securityDescription,   // optional
    WS_CHANNEL** channel,
    WS_ERROR* error   // optional
);
[DllImport("webservices.dll", ExactSpelling = true)]
static extern int WsCreateChannel(
    int channelType,   // WS_CHANNEL_TYPE
    int channelBinding,   // WS_CHANNEL_BINDING
    IntPtr properties,   // WS_CHANNEL_PROPERTY* optional
    uint propertyCount,   // DWORD
    IntPtr securityDescription,   // WS_SECURITY_DESCRIPTION* optional
    IntPtr channel,   // WS_CHANNEL** out
    IntPtr error   // WS_ERROR* optional
);
<DllImport("webservices.dll", ExactSpelling:=True)>
Public Shared Function WsCreateChannel(
    channelType As Integer,   ' WS_CHANNEL_TYPE
    channelBinding As Integer,   ' WS_CHANNEL_BINDING
    properties As IntPtr,   ' WS_CHANNEL_PROPERTY* optional
    propertyCount As UInteger,   ' DWORD
    securityDescription As IntPtr,   ' WS_SECURITY_DESCRIPTION* optional
    channel As IntPtr,   ' WS_CHANNEL** out
    [error] As IntPtr   ' WS_ERROR* optional
) As Integer
End Function
' channelType : WS_CHANNEL_TYPE
' channelBinding : WS_CHANNEL_BINDING
' properties : WS_CHANNEL_PROPERTY* optional
' propertyCount : DWORD
' securityDescription : WS_SECURITY_DESCRIPTION* optional
' channel : WS_CHANNEL** out
' error : WS_ERROR* optional
Declare PtrSafe Function WsCreateChannel Lib "webservices" ( _
    ByVal channelType As Long, _
    ByVal channelBinding As Long, _
    ByVal properties As LongPtr, _
    ByVal propertyCount As Long, _
    ByVal securityDescription As LongPtr, _
    ByVal channel As LongPtr, _
    ByVal error As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

WsCreateChannel = ctypes.windll.webservices.WsCreateChannel
WsCreateChannel.restype = ctypes.c_int
WsCreateChannel.argtypes = [
    ctypes.c_int,  # channelType : WS_CHANNEL_TYPE
    ctypes.c_int,  # channelBinding : WS_CHANNEL_BINDING
    ctypes.c_void_p,  # properties : WS_CHANNEL_PROPERTY* optional
    wintypes.DWORD,  # propertyCount : DWORD
    ctypes.c_void_p,  # securityDescription : WS_SECURITY_DESCRIPTION* optional
    ctypes.c_void_p,  # channel : WS_CHANNEL** out
    ctypes.c_void_p,  # error : WS_ERROR* optional
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('webservices.dll')
WsCreateChannel = Fiddle::Function.new(
  lib['WsCreateChannel'],
  [
    Fiddle::TYPE_INT,  # channelType : WS_CHANNEL_TYPE
    Fiddle::TYPE_INT,  # channelBinding : WS_CHANNEL_BINDING
    Fiddle::TYPE_VOIDP,  # properties : WS_CHANNEL_PROPERTY* optional
    -Fiddle::TYPE_INT,  # propertyCount : DWORD
    Fiddle::TYPE_VOIDP,  # securityDescription : WS_SECURITY_DESCRIPTION* optional
    Fiddle::TYPE_VOIDP,  # channel : WS_CHANNEL** out
    Fiddle::TYPE_VOIDP,  # error : WS_ERROR* optional
  ],
  Fiddle::TYPE_INT)
#[link(name = "webservices")]
extern "system" {
    fn WsCreateChannel(
        channelType: i32,  // WS_CHANNEL_TYPE
        channelBinding: i32,  // WS_CHANNEL_BINDING
        properties: *const WS_CHANNEL_PROPERTY,  // WS_CHANNEL_PROPERTY* optional
        propertyCount: u32,  // DWORD
        securityDescription: *const WS_SECURITY_DESCRIPTION,  // WS_SECURITY_DESCRIPTION* optional
        channel: *mut *mut isize,  // WS_CHANNEL** out
        error: *mut isize  // WS_ERROR* optional
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("webservices.dll")]
public static extern int WsCreateChannel(int channelType, int channelBinding, IntPtr properties, uint propertyCount, IntPtr securityDescription, IntPtr channel, IntPtr error);
"@
$api = Add-Type -MemberDefinition $sig -Name 'webservices_WsCreateChannel' -Namespace Win32 -PassThru
# $api::WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error)
#uselib "webservices.dll"
#func global WsCreateChannel "WsCreateChannel" sptr, sptr, sptr, sptr, sptr, sptr, sptr
; WsCreateChannel channelType, channelBinding, varptr(properties), propertyCount, varptr(securityDescription), varptr(channel), varptr(error)   ; 戻り値は stat
; channelType : WS_CHANNEL_TYPE -> "sptr"
; channelBinding : WS_CHANNEL_BINDING -> "sptr"
; properties : WS_CHANNEL_PROPERTY* optional -> "sptr"
; propertyCount : DWORD -> "sptr"
; securityDescription : WS_SECURITY_DESCRIPTION* optional -> "sptr"
; channel : WS_CHANNEL** out -> "sptr"
; error : WS_ERROR* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "webservices.dll"
#cfunc global WsCreateChannel "WsCreateChannel" int, int, var, int, var, var, var
; res = WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error)
; channelType : WS_CHANNEL_TYPE -> "int"
; channelBinding : WS_CHANNEL_BINDING -> "int"
; properties : WS_CHANNEL_PROPERTY* optional -> "var"
; propertyCount : DWORD -> "int"
; securityDescription : WS_SECURITY_DESCRIPTION* optional -> "var"
; channel : WS_CHANNEL** out -> "var"
; error : WS_ERROR* optional -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HRESULT WsCreateChannel(WS_CHANNEL_TYPE channelType, WS_CHANNEL_BINDING channelBinding, WS_CHANNEL_PROPERTY* properties, DWORD propertyCount, WS_SECURITY_DESCRIPTION* securityDescription, WS_CHANNEL** channel, WS_ERROR* error)
#uselib "webservices.dll"
#cfunc global WsCreateChannel "WsCreateChannel" int, int, var, int, var, var, var
; res = WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error)
; channelType : WS_CHANNEL_TYPE -> "int"
; channelBinding : WS_CHANNEL_BINDING -> "int"
; properties : WS_CHANNEL_PROPERTY* optional -> "var"
; propertyCount : DWORD -> "int"
; securityDescription : WS_SECURITY_DESCRIPTION* optional -> "var"
; channel : WS_CHANNEL** out -> "var"
; error : WS_ERROR* optional -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	webservices = windows.NewLazySystemDLL("webservices.dll")
	procWsCreateChannel = webservices.NewProc("WsCreateChannel")
)

// channelType (WS_CHANNEL_TYPE), channelBinding (WS_CHANNEL_BINDING), properties (WS_CHANNEL_PROPERTY* optional), propertyCount (DWORD), securityDescription (WS_SECURITY_DESCRIPTION* optional), channel (WS_CHANNEL** out), error (WS_ERROR* optional)
r1, _, err := procWsCreateChannel.Call(
	uintptr(channelType),
	uintptr(channelBinding),
	uintptr(properties),
	uintptr(propertyCount),
	uintptr(securityDescription),
	uintptr(channel),
	uintptr(error),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function WsCreateChannel(
  channelType: Integer;   // WS_CHANNEL_TYPE
  channelBinding: Integer;   // WS_CHANNEL_BINDING
  properties: Pointer;   // WS_CHANNEL_PROPERTY* optional
  propertyCount: DWORD;   // DWORD
  securityDescription: Pointer;   // WS_SECURITY_DESCRIPTION* optional
  channel: Pointer;   // WS_CHANNEL** out
  error: Pointer   // WS_ERROR* optional
): Integer; stdcall;
  external 'webservices.dll' name 'WsCreateChannel';
result := DllCall("webservices\WsCreateChannel"
    , "Int", channelType   ; WS_CHANNEL_TYPE
    , "Int", channelBinding   ; WS_CHANNEL_BINDING
    , "Ptr", properties   ; WS_CHANNEL_PROPERTY* optional
    , "UInt", propertyCount   ; DWORD
    , "Ptr", securityDescription   ; WS_SECURITY_DESCRIPTION* optional
    , "Ptr", channel   ; WS_CHANNEL** out
    , "Ptr", error   ; WS_ERROR* optional
    , "Int")   ; return: HRESULT
●WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error) = DLL("webservices.dll", "int WsCreateChannel(int, int, void*, dword, void*, void*, void*)")
# 呼び出し: WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error)
# channelType : WS_CHANNEL_TYPE -> "int"
# channelBinding : WS_CHANNEL_BINDING -> "int"
# properties : WS_CHANNEL_PROPERTY* optional -> "void*"
# propertyCount : DWORD -> "dword"
# securityDescription : WS_SECURITY_DESCRIPTION* optional -> "void*"
# channel : WS_CHANNEL** out -> "void*"
# error : WS_ERROR* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
const std = @import("std");

extern "webservices" fn WsCreateChannel(
    channelType: i32, // WS_CHANNEL_TYPE
    channelBinding: i32, // WS_CHANNEL_BINDING
    properties: [*c]WS_CHANNEL_PROPERTY, // WS_CHANNEL_PROPERTY* optional
    propertyCount: u32, // DWORD
    securityDescription: [*c]WS_SECURITY_DESCRIPTION, // WS_SECURITY_DESCRIPTION* optional
    channel: [*c][*c]isize, // WS_CHANNEL** out
    error: [*c]isize // WS_ERROR* optional
) callconv(std.os.windows.WINAPI) i32;
proc WsCreateChannel(
    channelType: int32,  # WS_CHANNEL_TYPE
    channelBinding: int32,  # WS_CHANNEL_BINDING
    properties: ptr WS_CHANNEL_PROPERTY,  # WS_CHANNEL_PROPERTY* optional
    propertyCount: uint32,  # DWORD
    securityDescription: ptr WS_SECURITY_DESCRIPTION,  # WS_SECURITY_DESCRIPTION* optional
    channel: ptr int,  # WS_CHANNEL** out
    error: ptr int  # WS_ERROR* optional
): int32 {.importc: "WsCreateChannel", stdcall, dynlib: "webservices.dll".}
pragma(lib, "webservices");
extern(Windows)
int WsCreateChannel(
    int channelType,   // WS_CHANNEL_TYPE
    int channelBinding,   // WS_CHANNEL_BINDING
    WS_CHANNEL_PROPERTY* properties,   // WS_CHANNEL_PROPERTY* optional
    uint propertyCount,   // DWORD
    WS_SECURITY_DESCRIPTION* securityDescription,   // WS_SECURITY_DESCRIPTION* optional
    ptrdiff_t** channel,   // WS_CHANNEL** out
    ptrdiff_t* error   // WS_ERROR* optional
);
ccall((:WsCreateChannel, "webservices.dll"), stdcall, Int32,
      (Int32, Int32, Ptr{WS_CHANNEL_PROPERTY}, UInt32, Ptr{WS_SECURITY_DESCRIPTION}, Ptr{Int}, Ptr{Int}),
      channelType, channelBinding, properties, propertyCount, securityDescription, channel, error)
# channelType : WS_CHANNEL_TYPE -> Int32
# channelBinding : WS_CHANNEL_BINDING -> Int32
# properties : WS_CHANNEL_PROPERTY* optional -> Ptr{WS_CHANNEL_PROPERTY}
# propertyCount : DWORD -> UInt32
# securityDescription : WS_SECURITY_DESCRIPTION* optional -> Ptr{WS_SECURITY_DESCRIPTION}
# channel : WS_CHANNEL** out -> Ptr{Int}
# error : WS_ERROR* optional -> Ptr{Int}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
local ffi = require("ffi")
ffi.cdef[[
int32_t WsCreateChannel(
    int32_t channelType,
    int32_t channelBinding,
    void* properties,
    uint32_t propertyCount,
    void* securityDescription,
    intptr_t** channel,
    intptr_t* error);
]]
local webservices = ffi.load("webservices")
-- webservices.WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error)
-- channelType : WS_CHANNEL_TYPE
-- channelBinding : WS_CHANNEL_BINDING
-- properties : WS_CHANNEL_PROPERTY* optional
-- propertyCount : DWORD
-- securityDescription : WS_SECURITY_DESCRIPTION* optional
-- channel : WS_CHANNEL** out
-- error : WS_ERROR* optional
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
const koffi = require('koffi');
const lib = koffi.load('webservices.dll');
const WsCreateChannel = lib.func('__stdcall', 'WsCreateChannel', 'int32_t', ['int32_t', 'int32_t', 'void *', 'uint32_t', 'void *', 'intptr_t *', 'intptr_t *']);
// WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error)
// channelType : WS_CHANNEL_TYPE -> 'int32_t'
// channelBinding : WS_CHANNEL_BINDING -> 'int32_t'
// properties : WS_CHANNEL_PROPERTY* optional -> 'void *'
// propertyCount : DWORD -> 'uint32_t'
// securityDescription : WS_SECURITY_DESCRIPTION* optional -> 'void *'
// channel : WS_CHANNEL** out -> 'intptr_t *'
// error : WS_ERROR* optional -> 'intptr_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("webservices.dll", {
  WsCreateChannel: { parameters: ["i32", "i32", "pointer", "u32", "pointer", "pointer", "pointer"], result: "i32" },
});
// lib.symbols.WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error)
// channelType : WS_CHANNEL_TYPE -> "i32"
// channelBinding : WS_CHANNEL_BINDING -> "i32"
// properties : WS_CHANNEL_PROPERTY* optional -> "pointer"
// propertyCount : DWORD -> "u32"
// securityDescription : WS_SECURITY_DESCRIPTION* optional -> "pointer"
// channel : WS_CHANNEL** out -> "pointer"
// error : WS_ERROR* optional -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
int32_t WsCreateChannel(
    int32_t channelType,
    int32_t channelBinding,
    void* properties,
    uint32_t propertyCount,
    void* securityDescription,
    intptr_t** channel,
    intptr_t* error);
C, "webservices.dll");
// $ffi->WsCreateChannel(channelType, channelBinding, properties, propertyCount, securityDescription, channel, error);
// channelType : WS_CHANNEL_TYPE
// channelBinding : WS_CHANNEL_BINDING
// properties : WS_CHANNEL_PROPERTY* optional
// propertyCount : DWORD
// securityDescription : WS_SECURITY_DESCRIPTION* optional
// channel : WS_CHANNEL** out
// error : WS_ERROR* optional
// 構造体/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 Webservices extends StdCallLibrary {
    Webservices INSTANCE = Native.load("webservices", Webservices.class);
    int WsCreateChannel(
        int channelType,   // WS_CHANNEL_TYPE
        int channelBinding,   // WS_CHANNEL_BINDING
        Pointer properties,   // WS_CHANNEL_PROPERTY* optional
        int propertyCount,   // DWORD
        Pointer securityDescription,   // WS_SECURITY_DESCRIPTION* optional
        Pointer channel,   // WS_CHANNEL** out
        LongByReference error   // WS_ERROR* optional
    );
}
@[Link("webservices")]
lib Libwebservices
  fun WsCreateChannel = WsCreateChannel(
    channelType : Int32,   # WS_CHANNEL_TYPE
    channelBinding : Int32,   # WS_CHANNEL_BINDING
    properties : WS_CHANNEL_PROPERTY*,   # WS_CHANNEL_PROPERTY* optional
    propertyCount : UInt32,   # DWORD
    securityDescription : WS_SECURITY_DESCRIPTION*,   # WS_SECURITY_DESCRIPTION* optional
    channel : LibC::SSizeT**,   # WS_CHANNEL** out
    error : LibC::SSizeT*   # WS_ERROR* optional
  ) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef WsCreateChannelNative = Int32 Function(Int32, Int32, Pointer<Void>, Uint32, Pointer<Void>, Pointer<IntPtr>, Pointer<IntPtr>);
typedef WsCreateChannelDart = int Function(int, int, Pointer<Void>, int, Pointer<Void>, Pointer<IntPtr>, Pointer<IntPtr>);
final WsCreateChannel = DynamicLibrary.open('webservices.dll')
    .lookupFunction<WsCreateChannelNative, WsCreateChannelDart>('WsCreateChannel');
// channelType : WS_CHANNEL_TYPE -> Int32
// channelBinding : WS_CHANNEL_BINDING -> Int32
// properties : WS_CHANNEL_PROPERTY* optional -> Pointer<Void>
// propertyCount : DWORD -> Uint32
// securityDescription : WS_SECURITY_DESCRIPTION* optional -> Pointer<Void>
// channel : WS_CHANNEL** out -> Pointer<IntPtr>
// error : WS_ERROR* optional -> Pointer<IntPtr>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function WsCreateChannel(
  channelType: Integer;   // WS_CHANNEL_TYPE
  channelBinding: Integer;   // WS_CHANNEL_BINDING
  properties: Pointer;   // WS_CHANNEL_PROPERTY* optional
  propertyCount: DWORD;   // DWORD
  securityDescription: Pointer;   // WS_SECURITY_DESCRIPTION* optional
  channel: Pointer;   // WS_CHANNEL** out
  error: Pointer   // WS_ERROR* optional
): Integer; stdcall;
  external 'webservices.dll' name 'WsCreateChannel';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "WsCreateChannel"
  c_WsCreateChannel :: Int32 -> Int32 -> Ptr () -> Word32 -> Ptr () -> Ptr CIntPtr -> Ptr CIntPtr -> IO Int32
-- channelType : WS_CHANNEL_TYPE -> Int32
-- channelBinding : WS_CHANNEL_BINDING -> Int32
-- properties : WS_CHANNEL_PROPERTY* optional -> Ptr ()
-- propertyCount : DWORD -> Word32
-- securityDescription : WS_SECURITY_DESCRIPTION* optional -> Ptr ()
-- channel : WS_CHANNEL** out -> Ptr CIntPtr
-- error : WS_ERROR* optional -> Ptr CIntPtr
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let wscreatechannel =
  foreign "WsCreateChannel"
    (int32_t @-> int32_t @-> (ptr void) @-> uint32_t @-> (ptr void) @-> (ptr intptr_t) @-> (ptr intptr_t) @-> returning int32_t)
(* channelType : WS_CHANNEL_TYPE -> int32_t *)
(* channelBinding : WS_CHANNEL_BINDING -> int32_t *)
(* properties : WS_CHANNEL_PROPERTY* optional -> (ptr void) *)
(* propertyCount : DWORD -> uint32_t *)
(* securityDescription : WS_SECURITY_DESCRIPTION* optional -> (ptr void) *)
(* channel : WS_CHANNEL** out -> (ptr intptr_t) *)
(* error : WS_ERROR* optional -> (ptr intptr_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library webservices (t "webservices.dll"))
(cffi:use-foreign-library webservices)

(cffi:defcfun ("WsCreateChannel" ws-create-channel :convention :stdcall) :int32
  (channel-type :int32)   ; WS_CHANNEL_TYPE
  (channel-binding :int32)   ; WS_CHANNEL_BINDING
  (properties :pointer)   ; WS_CHANNEL_PROPERTY* optional
  (property-count :uint32)   ; DWORD
  (security-description :pointer)   ; WS_SECURITY_DESCRIPTION* optional
  (channel :pointer)   ; WS_CHANNEL** out
  (error :pointer))   ; WS_ERROR* optional
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $WsCreateChannel = Win32::API::More->new('webservices',
    'int WsCreateChannel(int channelType, int channelBinding, LPVOID properties, DWORD propertyCount, LPVOID securityDescription, LPVOID channel, LPVOID error)');
# my $ret = $WsCreateChannel->Call($channelType, $channelBinding, $properties, $propertyCount, $securityDescription, $channel, $error);
# channelType : WS_CHANNEL_TYPE -> int
# channelBinding : WS_CHANNEL_BINDING -> int
# properties : WS_CHANNEL_PROPERTY* optional -> LPVOID
# propertyCount : DWORD -> DWORD
# securityDescription : WS_SECURITY_DESCRIPTION* optional -> LPVOID
# channel : WS_CHANNEL** out -> LPVOID
# error : WS_ERROR* optional -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。

関連項目

使用する型