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