ホーム › Security.ExtensibleAuthenticationProtocol › EapHostPeerClearConnection
EapHostPeerClearConnection
関数指定接続に関連付けられたEAP状態をクリアする。
シグネチャ
// eappprxy.dll
#include <windows.h>
DWORD EapHostPeerClearConnection(
GUID* pConnectionId,
EAP_ERROR** ppEapError
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| pConnectionId | GUID* | in | クリアする対象接続のGUIDへのポインタ。 |
| ppEapError | EAP_ERROR** | out | エラー発生時にEAP_ERROR構造体のアドレスを受け取るポインタ。解放が必要。 |
戻り値の型: DWORD
各言語での呼び出し定義
// eappprxy.dll
#include <windows.h>
DWORD EapHostPeerClearConnection(
GUID* pConnectionId,
EAP_ERROR** ppEapError
);[DllImport("eappprxy.dll", ExactSpelling = true)]
static extern uint EapHostPeerClearConnection(
ref Guid pConnectionId, // GUID*
IntPtr ppEapError // EAP_ERROR** out
);<DllImport("eappprxy.dll", ExactSpelling:=True)>
Public Shared Function EapHostPeerClearConnection(
ByRef pConnectionId As Guid, ' GUID*
ppEapError As IntPtr ' EAP_ERROR** out
) As UInteger
End Function' pConnectionId : GUID*
' ppEapError : EAP_ERROR** out
Declare PtrSafe Function EapHostPeerClearConnection Lib "eappprxy" ( _
ByVal pConnectionId As LongPtr, _
ByVal ppEapError As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
EapHostPeerClearConnection = ctypes.windll.eappprxy.EapHostPeerClearConnection
EapHostPeerClearConnection.restype = wintypes.DWORD
EapHostPeerClearConnection.argtypes = [
ctypes.c_void_p, # pConnectionId : GUID*
ctypes.c_void_p, # ppEapError : EAP_ERROR** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('eappprxy.dll')
EapHostPeerClearConnection = Fiddle::Function.new(
lib['EapHostPeerClearConnection'],
[
Fiddle::TYPE_VOIDP, # pConnectionId : GUID*
Fiddle::TYPE_VOIDP, # ppEapError : EAP_ERROR** out
],
-Fiddle::TYPE_INT)#[link(name = "eappprxy")]
extern "system" {
fn EapHostPeerClearConnection(
pConnectionId: *mut GUID, // GUID*
ppEapError: *mut *mut EAP_ERROR // EAP_ERROR** out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("eappprxy.dll")]
public static extern uint EapHostPeerClearConnection(ref Guid pConnectionId, IntPtr ppEapError);
"@
$api = Add-Type -MemberDefinition $sig -Name 'eappprxy_EapHostPeerClearConnection' -Namespace Win32 -PassThru
# $api::EapHostPeerClearConnection(pConnectionId, ppEapError)#uselib "eappprxy.dll"
#func global EapHostPeerClearConnection "EapHostPeerClearConnection" sptr, sptr
; EapHostPeerClearConnection varptr(pConnectionId), varptr(ppEapError) ; 戻り値は stat
; pConnectionId : GUID* -> "sptr"
; ppEapError : EAP_ERROR** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "eappprxy.dll" #cfunc global EapHostPeerClearConnection "EapHostPeerClearConnection" var, var ; res = EapHostPeerClearConnection(pConnectionId, ppEapError) ; pConnectionId : GUID* -> "var" ; ppEapError : EAP_ERROR** out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "eappprxy.dll" #cfunc global EapHostPeerClearConnection "EapHostPeerClearConnection" sptr, sptr ; res = EapHostPeerClearConnection(varptr(pConnectionId), varptr(ppEapError)) ; pConnectionId : GUID* -> "sptr" ; ppEapError : EAP_ERROR** out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD EapHostPeerClearConnection(GUID* pConnectionId, EAP_ERROR** ppEapError) #uselib "eappprxy.dll" #cfunc global EapHostPeerClearConnection "EapHostPeerClearConnection" var, var ; res = EapHostPeerClearConnection(pConnectionId, ppEapError) ; pConnectionId : GUID* -> "var" ; ppEapError : EAP_ERROR** out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD EapHostPeerClearConnection(GUID* pConnectionId, EAP_ERROR** ppEapError) #uselib "eappprxy.dll" #cfunc global EapHostPeerClearConnection "EapHostPeerClearConnection" intptr, intptr ; res = EapHostPeerClearConnection(varptr(pConnectionId), varptr(ppEapError)) ; pConnectionId : GUID* -> "intptr" ; ppEapError : EAP_ERROR** out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
eappprxy = windows.NewLazySystemDLL("eappprxy.dll")
procEapHostPeerClearConnection = eappprxy.NewProc("EapHostPeerClearConnection")
)
// pConnectionId (GUID*), ppEapError (EAP_ERROR** out)
r1, _, err := procEapHostPeerClearConnection.Call(
uintptr(pConnectionId),
uintptr(ppEapError),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction EapHostPeerClearConnection(
pConnectionId: PGUID; // GUID*
ppEapError: Pointer // EAP_ERROR** out
): DWORD; stdcall;
external 'eappprxy.dll' name 'EapHostPeerClearConnection';result := DllCall("eappprxy\EapHostPeerClearConnection"
, "Ptr", pConnectionId ; GUID*
, "Ptr", ppEapError ; EAP_ERROR** out
, "UInt") ; return: DWORD●EapHostPeerClearConnection(pConnectionId, ppEapError) = DLL("eappprxy.dll", "dword EapHostPeerClearConnection(void*, void*)")
# 呼び出し: EapHostPeerClearConnection(pConnectionId, ppEapError)
# pConnectionId : GUID* -> "void*"
# ppEapError : EAP_ERROR** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "eappprxy" fn EapHostPeerClearConnection(
pConnectionId: [*c]GUID, // GUID*
ppEapError: [*c][*c]EAP_ERROR // EAP_ERROR** out
) callconv(std.os.windows.WINAPI) u32;proc EapHostPeerClearConnection(
pConnectionId: ptr GUID, # GUID*
ppEapError: ptr EAP_ERROR # EAP_ERROR** out
): uint32 {.importc: "EapHostPeerClearConnection", stdcall, dynlib: "eappprxy.dll".}pragma(lib, "eappprxy");
extern(Windows)
uint EapHostPeerClearConnection(
GUID* pConnectionId, // GUID*
EAP_ERROR** ppEapError // EAP_ERROR** out
);ccall((:EapHostPeerClearConnection, "eappprxy.dll"), stdcall, UInt32,
(Ptr{GUID}, Ptr{EAP_ERROR}),
pConnectionId, ppEapError)
# pConnectionId : GUID* -> Ptr{GUID}
# ppEapError : EAP_ERROR** out -> Ptr{EAP_ERROR}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
uint32_t EapHostPeerClearConnection(
void* pConnectionId,
void* ppEapError);
]]
local eappprxy = ffi.load("eappprxy")
-- eappprxy.EapHostPeerClearConnection(pConnectionId, ppEapError)
-- pConnectionId : GUID*
-- ppEapError : EAP_ERROR** out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('eappprxy.dll');
const EapHostPeerClearConnection = lib.func('__stdcall', 'EapHostPeerClearConnection', 'uint32_t', ['void *', 'void *']);
// EapHostPeerClearConnection(pConnectionId, ppEapError)
// pConnectionId : GUID* -> 'void *'
// ppEapError : EAP_ERROR** out -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("eappprxy.dll", {
EapHostPeerClearConnection: { parameters: ["pointer", "pointer"], result: "u32" },
});
// lib.symbols.EapHostPeerClearConnection(pConnectionId, ppEapError)
// pConnectionId : GUID* -> "pointer"
// ppEapError : EAP_ERROR** out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t EapHostPeerClearConnection(
void* pConnectionId,
void* ppEapError);
C, "eappprxy.dll");
// $ffi->EapHostPeerClearConnection(pConnectionId, ppEapError);
// pConnectionId : GUID*
// ppEapError : EAP_ERROR** 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 Eappprxy extends StdCallLibrary {
Eappprxy INSTANCE = Native.load("eappprxy", Eappprxy.class);
int EapHostPeerClearConnection(
Pointer pConnectionId, // GUID*
Pointer ppEapError // EAP_ERROR** out
);
}@[Link("eappprxy")]
lib Libeappprxy
fun EapHostPeerClearConnection = EapHostPeerClearConnection(
pConnectionId : GUID*, # GUID*
ppEapError : EAP_ERROR** # EAP_ERROR** out
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef EapHostPeerClearConnectionNative = Uint32 Function(Pointer<Void>, Pointer<Void>);
typedef EapHostPeerClearConnectionDart = int Function(Pointer<Void>, Pointer<Void>);
final EapHostPeerClearConnection = DynamicLibrary.open('eappprxy.dll')
.lookupFunction<EapHostPeerClearConnectionNative, EapHostPeerClearConnectionDart>('EapHostPeerClearConnection');
// pConnectionId : GUID* -> Pointer<Void>
// ppEapError : EAP_ERROR** out -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function EapHostPeerClearConnection(
pConnectionId: PGUID; // GUID*
ppEapError: Pointer // EAP_ERROR** out
): DWORD; stdcall;
external 'eappprxy.dll' name 'EapHostPeerClearConnection';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "EapHostPeerClearConnection"
c_EapHostPeerClearConnection :: Ptr () -> Ptr () -> IO Word32
-- pConnectionId : GUID* -> Ptr ()
-- ppEapError : EAP_ERROR** out -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let eaphostpeerclearconnection =
foreign "EapHostPeerClearConnection"
((ptr void) @-> (ptr void) @-> returning uint32_t)
(* pConnectionId : GUID* -> (ptr void) *)
(* ppEapError : EAP_ERROR** out -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library eappprxy (t "eappprxy.dll"))
(cffi:use-foreign-library eappprxy)
(cffi:defcfun ("EapHostPeerClearConnection" eap-host-peer-clear-connection :convention :stdcall) :uint32
(p-connection-id :pointer) ; GUID*
(pp-eap-error :pointer)) ; EAP_ERROR** out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $EapHostPeerClearConnection = Win32::API::More->new('eappprxy',
'DWORD EapHostPeerClearConnection(LPVOID pConnectionId, LPVOID ppEapError)');
# my $ret = $EapHostPeerClearConnection->Call($pConnectionId, $ppEapError);
# pConnectionId : GUID* -> LPVOID
# ppEapError : EAP_ERROR** out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
使用する型