ホーム › Networking.Ldap › ldap_stop_tls_s
ldap_stop_tls_s
関数LDAP接続のTLSセッションを停止する。
シグネチャ
// WLDAP32.dll
#include <windows.h>
BOOLEAN ldap_stop_tls_s(
LDAP* ExternalHandle
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| ExternalHandle | LDAP* | inout |
戻り値の型: BOOLEAN
各言語での呼び出し定義
// WLDAP32.dll
#include <windows.h>
BOOLEAN ldap_stop_tls_s(
LDAP* ExternalHandle
);[DllImport("WLDAP32.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern byte ldap_stop_tls_s(
IntPtr ExternalHandle // LDAP* in/out
);<DllImport("WLDAP32.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ldap_stop_tls_s(
ExternalHandle As IntPtr ' LDAP* in/out
) As Byte
End Function' ExternalHandle : LDAP* in/out
Declare PtrSafe Function ldap_stop_tls_s Lib "wldap32" ( _
ByVal ExternalHandle As LongPtr) As Byte
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ldap_stop_tls_s = ctypes.cdll.wldap32.ldap_stop_tls_s
ldap_stop_tls_s.restype = ctypes.c_byte
ldap_stop_tls_s.argtypes = [
ctypes.c_void_p, # ExternalHandle : LDAP* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('WLDAP32.dll')
ldap_stop_tls_s = Fiddle::Function.new(
lib['ldap_stop_tls_s'],
[
Fiddle::TYPE_VOIDP, # ExternalHandle : LDAP* in/out
],
Fiddle::TYPE_CHAR, Fiddle::Function::CDECL)#[link(name = "wldap32")]
extern "C" {
fn ldap_stop_tls_s(
ExternalHandle: *mut LDAP // LDAP* in/out
) -> u8;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("WLDAP32.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ldap_stop_tls_s(IntPtr ExternalHandle);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WLDAP32_ldap_stop_tls_s' -Namespace Win32 -PassThru
# $api::ldap_stop_tls_s(ExternalHandle)#uselib "WLDAP32.dll"
#func global ldap_stop_tls_s "ldap_stop_tls_s" sptr
; ldap_stop_tls_s varptr(ExternalHandle) ; 戻り値は stat
; ExternalHandle : LDAP* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "WLDAP32.dll" #cfunc global ldap_stop_tls_s "ldap_stop_tls_s" var ; res = ldap_stop_tls_s(ExternalHandle) ; ExternalHandle : LDAP* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "WLDAP32.dll" #cfunc global ldap_stop_tls_s "ldap_stop_tls_s" sptr ; res = ldap_stop_tls_s(varptr(ExternalHandle)) ; ExternalHandle : LDAP* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; BOOLEAN ldap_stop_tls_s(LDAP* ExternalHandle) #uselib "WLDAP32.dll" #cfunc global ldap_stop_tls_s "ldap_stop_tls_s" var ; res = ldap_stop_tls_s(ExternalHandle) ; ExternalHandle : LDAP* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOLEAN ldap_stop_tls_s(LDAP* ExternalHandle) #uselib "WLDAP32.dll" #cfunc global ldap_stop_tls_s "ldap_stop_tls_s" intptr ; res = ldap_stop_tls_s(varptr(ExternalHandle)) ; ExternalHandle : LDAP* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wldap32 = windows.NewLazySystemDLL("WLDAP32.dll")
procldap_stop_tls_s = wldap32.NewProc("ldap_stop_tls_s")
)
// ExternalHandle (LDAP* in/out)
r1, _, err := procldap_stop_tls_s.Call(
uintptr(ExternalHandle),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLEANfunction ldap_stop_tls_s(
ExternalHandle: Pointer // LDAP* in/out
): ByteBool; cdecl;
external 'WLDAP32.dll' name 'ldap_stop_tls_s';result := DllCall("WLDAP32\ldap_stop_tls_s"
, "Ptr", ExternalHandle ; LDAP* in/out
, "Cdecl Char") ; return: BOOLEAN●ldap_stop_tls_s(ExternalHandle) = DLL("WLDAP32.dll", "byte ldap_stop_tls_s(void*)")
# 呼び出し: ldap_stop_tls_s(ExternalHandle)
# ExternalHandle : LDAP* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。