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