ホーム › Networking.Ldap › ldap_compare_ext_sA
ldap_compare_ext_sA
関数コントロール付きで属性値を同期的に比較する拡張版(ANSI版)。
シグネチャ
// WLDAP32.dll (ANSI / -A)
#include <windows.h>
DWORD ldap_compare_ext_sA(
LDAP* ld,
LPCSTR dn,
LPCSTR Attr,
LPCSTR Value, // optional
LDAP_BERVAL* Data, // optional
LDAPControlA** ServerControls,
LDAPControlA** ClientControls
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| ld | LDAP* | inout | 比較操作を行う対象のLDAPセッションハンドル。 |
| dn | LPCSTR | in | 比較対象エントリの識別名(DN、ANSI)。 |
| Attr | LPCSTR | in | 比較する属性名(ANSI)。エントリ内の対象属性を指す。 |
| Value | LPCSTR | inoptional | 属性と照合する文字列値(ANSI)。Dataを使う場合はNULLとする。 |
| Data | LDAP_BERVAL* | inoptional | バイナリ値で比較する場合のLDAP_BERVAL構造体へのポインタ。文字列比較時はNULL。 |
| ServerControls | LDAPControlA** | inout | サーバー側コントロールの配列(LDAPControlA*の配列)。不要ならNULL。 |
| ClientControls | LDAPControlA** | inout | クライアント側コントロールの配列(LDAPControlA*の配列)。不要ならNULL。 |
戻り値の型: DWORD
各言語での呼び出し定義
// WLDAP32.dll (ANSI / -A)
#include <windows.h>
DWORD ldap_compare_ext_sA(
LDAP* ld,
LPCSTR dn,
LPCSTR Attr,
LPCSTR Value, // optional
LDAP_BERVAL* Data, // optional
LDAPControlA** ServerControls,
LDAPControlA** ClientControls
);[DllImport("WLDAP32.dll", CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern uint ldap_compare_ext_sA(
IntPtr ld, // LDAP* in/out
[MarshalAs(UnmanagedType.LPStr)] string dn, // LPCSTR
[MarshalAs(UnmanagedType.LPStr)] string Attr, // LPCSTR
[MarshalAs(UnmanagedType.LPStr)] string Value, // LPCSTR optional
IntPtr Data, // LDAP_BERVAL* optional
IntPtr ServerControls, // LDAPControlA** in/out
IntPtr ClientControls // LDAPControlA** in/out
);<DllImport("WLDAP32.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function ldap_compare_ext_sA(
ld As IntPtr, ' LDAP* in/out
<MarshalAs(UnmanagedType.LPStr)> dn As String, ' LPCSTR
<MarshalAs(UnmanagedType.LPStr)> Attr As String, ' LPCSTR
<MarshalAs(UnmanagedType.LPStr)> Value As String, ' LPCSTR optional
Data As IntPtr, ' LDAP_BERVAL* optional
ServerControls As IntPtr, ' LDAPControlA** in/out
ClientControls As IntPtr ' LDAPControlA** in/out
) As UInteger
End Function' ld : LDAP* in/out
' dn : LPCSTR
' Attr : LPCSTR
' Value : LPCSTR optional
' Data : LDAP_BERVAL* optional
' ServerControls : LDAPControlA** in/out
' ClientControls : LDAPControlA** in/out
Declare PtrSafe Function ldap_compare_ext_sA Lib "wldap32" ( _
ByVal ld As LongPtr, _
ByVal dn As String, _
ByVal Attr As String, _
ByVal Value As String, _
ByVal Data As LongPtr, _
ByVal ServerControls As LongPtr, _
ByVal ClientControls As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ldap_compare_ext_sA = ctypes.cdll.wldap32.ldap_compare_ext_sA
ldap_compare_ext_sA.restype = wintypes.DWORD
ldap_compare_ext_sA.argtypes = [
ctypes.c_void_p, # ld : LDAP* in/out
wintypes.LPCSTR, # dn : LPCSTR
wintypes.LPCSTR, # Attr : LPCSTR
wintypes.LPCSTR, # Value : LPCSTR optional
ctypes.c_void_p, # Data : LDAP_BERVAL* optional
ctypes.c_void_p, # ServerControls : LDAPControlA** in/out
ctypes.c_void_p, # ClientControls : LDAPControlA** in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('WLDAP32.dll')
ldap_compare_ext_sA = Fiddle::Function.new(
lib['ldap_compare_ext_sA'],
[
Fiddle::TYPE_VOIDP, # ld : LDAP* in/out
Fiddle::TYPE_VOIDP, # dn : LPCSTR
Fiddle::TYPE_VOIDP, # Attr : LPCSTR
Fiddle::TYPE_VOIDP, # Value : LPCSTR optional
Fiddle::TYPE_VOIDP, # Data : LDAP_BERVAL* optional
Fiddle::TYPE_VOIDP, # ServerControls : LDAPControlA** in/out
Fiddle::TYPE_VOIDP, # ClientControls : LDAPControlA** in/out
],
-Fiddle::TYPE_INT, Fiddle::Function::CDECL)#[link(name = "wldap32")]
extern "C" {
fn ldap_compare_ext_sA(
ld: *mut LDAP, // LDAP* in/out
dn: *const u8, // LPCSTR
Attr: *const u8, // LPCSTR
Value: *const u8, // LPCSTR optional
Data: *mut LDAP_BERVAL, // LDAP_BERVAL* optional
ServerControls: *mut *mut LDAPControlA, // LDAPControlA** in/out
ClientControls: *mut *mut LDAPControlA // LDAPControlA** in/out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("WLDAP32.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern uint ldap_compare_ext_sA(IntPtr ld, [MarshalAs(UnmanagedType.LPStr)] string dn, [MarshalAs(UnmanagedType.LPStr)] string Attr, [MarshalAs(UnmanagedType.LPStr)] string Value, IntPtr Data, IntPtr ServerControls, IntPtr ClientControls);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WLDAP32_ldap_compare_ext_sA' -Namespace Win32 -PassThru
# $api::ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls)#uselib "WLDAP32.dll"
#func global ldap_compare_ext_sA "ldap_compare_ext_sA" sptr, sptr, sptr, sptr, sptr, sptr, sptr
; ldap_compare_ext_sA varptr(ld), dn, Attr, Value, varptr(Data), varptr(ServerControls), varptr(ClientControls) ; 戻り値は stat
; ld : LDAP* in/out -> "sptr"
; dn : LPCSTR -> "sptr"
; Attr : LPCSTR -> "sptr"
; Value : LPCSTR optional -> "sptr"
; Data : LDAP_BERVAL* optional -> "sptr"
; ServerControls : LDAPControlA** in/out -> "sptr"
; ClientControls : LDAPControlA** in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "WLDAP32.dll" #cfunc global ldap_compare_ext_sA "ldap_compare_ext_sA" var, str, str, str, var, var, var ; res = ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls) ; ld : LDAP* in/out -> "var" ; dn : LPCSTR -> "str" ; Attr : LPCSTR -> "str" ; Value : LPCSTR optional -> "str" ; Data : LDAP_BERVAL* optional -> "var" ; ServerControls : LDAPControlA** in/out -> "var" ; ClientControls : LDAPControlA** in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "WLDAP32.dll" #cfunc global ldap_compare_ext_sA "ldap_compare_ext_sA" sptr, str, str, str, sptr, sptr, sptr ; res = ldap_compare_ext_sA(varptr(ld), dn, Attr, Value, varptr(Data), varptr(ServerControls), varptr(ClientControls)) ; ld : LDAP* in/out -> "sptr" ; dn : LPCSTR -> "str" ; Attr : LPCSTR -> "str" ; Value : LPCSTR optional -> "str" ; Data : LDAP_BERVAL* optional -> "sptr" ; ServerControls : LDAPControlA** in/out -> "sptr" ; ClientControls : LDAPControlA** in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD ldap_compare_ext_sA(LDAP* ld, LPCSTR dn, LPCSTR Attr, LPCSTR Value, LDAP_BERVAL* Data, LDAPControlA** ServerControls, LDAPControlA** ClientControls) #uselib "WLDAP32.dll" #cfunc global ldap_compare_ext_sA "ldap_compare_ext_sA" var, str, str, str, var, var, var ; res = ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls) ; ld : LDAP* in/out -> "var" ; dn : LPCSTR -> "str" ; Attr : LPCSTR -> "str" ; Value : LPCSTR optional -> "str" ; Data : LDAP_BERVAL* optional -> "var" ; ServerControls : LDAPControlA** in/out -> "var" ; ClientControls : LDAPControlA** in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD ldap_compare_ext_sA(LDAP* ld, LPCSTR dn, LPCSTR Attr, LPCSTR Value, LDAP_BERVAL* Data, LDAPControlA** ServerControls, LDAPControlA** ClientControls) #uselib "WLDAP32.dll" #cfunc global ldap_compare_ext_sA "ldap_compare_ext_sA" intptr, str, str, str, intptr, intptr, intptr ; res = ldap_compare_ext_sA(varptr(ld), dn, Attr, Value, varptr(Data), varptr(ServerControls), varptr(ClientControls)) ; ld : LDAP* in/out -> "intptr" ; dn : LPCSTR -> "str" ; Attr : LPCSTR -> "str" ; Value : LPCSTR optional -> "str" ; Data : LDAP_BERVAL* optional -> "intptr" ; ServerControls : LDAPControlA** in/out -> "intptr" ; ClientControls : LDAPControlA** in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wldap32 = windows.NewLazySystemDLL("WLDAP32.dll")
procldap_compare_ext_sA = wldap32.NewProc("ldap_compare_ext_sA")
)
// ld (LDAP* in/out), dn (LPCSTR), Attr (LPCSTR), Value (LPCSTR optional), Data (LDAP_BERVAL* optional), ServerControls (LDAPControlA** in/out), ClientControls (LDAPControlA** in/out)
r1, _, err := procldap_compare_ext_sA.Call(
uintptr(ld),
uintptr(unsafe.Pointer(windows.BytePtrFromString(dn))),
uintptr(unsafe.Pointer(windows.BytePtrFromString(Attr))),
uintptr(unsafe.Pointer(windows.BytePtrFromString(Value))),
uintptr(Data),
uintptr(ServerControls),
uintptr(ClientControls),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction ldap_compare_ext_sA(
ld: Pointer; // LDAP* in/out
dn: PAnsiChar; // LPCSTR
Attr: PAnsiChar; // LPCSTR
Value: PAnsiChar; // LPCSTR optional
Data: Pointer; // LDAP_BERVAL* optional
ServerControls: Pointer; // LDAPControlA** in/out
ClientControls: Pointer // LDAPControlA** in/out
): DWORD; cdecl;
external 'WLDAP32.dll' name 'ldap_compare_ext_sA';result := DllCall("WLDAP32\ldap_compare_ext_sA"
, "Ptr", ld ; LDAP* in/out
, "AStr", dn ; LPCSTR
, "AStr", Attr ; LPCSTR
, "AStr", Value ; LPCSTR optional
, "Ptr", Data ; LDAP_BERVAL* optional
, "Ptr", ServerControls ; LDAPControlA** in/out
, "Ptr", ClientControls ; LDAPControlA** in/out
, "Cdecl UInt") ; return: DWORD●ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls) = DLL("WLDAP32.dll", "dword ldap_compare_ext_sA(void*, char*, char*, char*, void*, void*, void*)")
# 呼び出し: ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls)
# ld : LDAP* in/out -> "void*"
# dn : LPCSTR -> "char*"
# Attr : LPCSTR -> "char*"
# Value : LPCSTR optional -> "char*"
# Data : LDAP_BERVAL* optional -> "void*"
# ServerControls : LDAPControlA** in/out -> "void*"
# ClientControls : LDAPControlA** in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。const std = @import("std");
extern "wldap32" fn ldap_compare_ext_sA(
ld: [*c]LDAP, // LDAP* in/out
dn: [*c]const u8, // LPCSTR
Attr: [*c]const u8, // LPCSTR
Value: [*c]const u8, // LPCSTR optional
Data: [*c]LDAP_BERVAL, // LDAP_BERVAL* optional
ServerControls: [*c][*c]LDAPControlA, // LDAPControlA** in/out
ClientControls: [*c][*c]LDAPControlA // LDAPControlA** in/out
) callconv(.c) u32;proc ldap_compare_ext_sA(
ld: ptr LDAP, # LDAP* in/out
dn: cstring, # LPCSTR
Attr: cstring, # LPCSTR
Value: cstring, # LPCSTR optional
Data: ptr LDAP_BERVAL, # LDAP_BERVAL* optional
ServerControls: ptr LDAPControlA, # LDAPControlA** in/out
ClientControls: ptr LDAPControlA # LDAPControlA** in/out
): uint32 {.importc: "ldap_compare_ext_sA", cdecl, dynlib: "WLDAP32.dll".}pragma(lib, "wldap32");
extern(C)
uint ldap_compare_ext_sA(
LDAP* ld, // LDAP* in/out
const(char)* dn, // LPCSTR
const(char)* Attr, // LPCSTR
const(char)* Value, // LPCSTR optional
LDAP_BERVAL* Data, // LDAP_BERVAL* optional
LDAPControlA** ServerControls, // LDAPControlA** in/out
LDAPControlA** ClientControls // LDAPControlA** in/out
);ccall((:ldap_compare_ext_sA, "WLDAP32.dll"), UInt32,
(Ptr{LDAP}, Cstring, Cstring, Cstring, Ptr{LDAP_BERVAL}, Ptr{LDAPControlA}, Ptr{LDAPControlA}),
ld, dn, Attr, Value, Data, ServerControls, ClientControls)
# ld : LDAP* in/out -> Ptr{LDAP}
# dn : LPCSTR -> Cstring
# Attr : LPCSTR -> Cstring
# Value : LPCSTR optional -> Cstring
# Data : LDAP_BERVAL* optional -> Ptr{LDAP_BERVAL}
# ServerControls : LDAPControlA** in/out -> Ptr{LDAPControlA}
# ClientControls : LDAPControlA** in/out -> Ptr{LDAPControlA}local ffi = require("ffi")
ffi.cdef[[
uint32_t ldap_compare_ext_sA(
void* ld,
const char* dn,
const char* Attr,
const char* Value,
void* Data,
void* ServerControls,
void* ClientControls);
]]
local wldap32 = ffi.load("wldap32")
-- wldap32.ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls)
-- ld : LDAP* in/out
-- dn : LPCSTR
-- Attr : LPCSTR
-- Value : LPCSTR optional
-- Data : LDAP_BERVAL* optional
-- ServerControls : LDAPControlA** in/out
-- ClientControls : LDAPControlA** in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('WLDAP32.dll');
const ldap_compare_ext_sA = lib.func('__cdecl', 'ldap_compare_ext_sA', 'uint32_t', ['void *', 'str', 'str', 'str', 'void *', 'void *', 'void *']);
// ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls)
// ld : LDAP* in/out -> 'void *'
// dn : LPCSTR -> 'str'
// Attr : LPCSTR -> 'str'
// Value : LPCSTR optional -> 'str'
// Data : LDAP_BERVAL* optional -> 'void *'
// ServerControls : LDAPControlA** in/out -> 'void *'
// ClientControls : LDAPControlA** in/out -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("WLDAP32.dll", {
ldap_compare_ext_sA: { parameters: ["pointer", "buffer", "buffer", "buffer", "pointer", "pointer", "pointer"], result: "u32" },
});
// lib.symbols.ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls)
// ld : LDAP* in/out -> "pointer"
// dn : LPCSTR -> "buffer"
// Attr : LPCSTR -> "buffer"
// Value : LPCSTR optional -> "buffer"
// Data : LDAP_BERVAL* optional -> "pointer"
// ServerControls : LDAPControlA** in/out -> "pointer"
// ClientControls : LDAPControlA** in/out -> "pointer"
// 文字列は "buffer"。ANSI(-A) は new TextEncoder() で UTF-8/ANSI バイト列(末尾に \x00)を渡す。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t ldap_compare_ext_sA(
void* ld,
const char* dn,
const char* Attr,
const char* Value,
void* Data,
void* ServerControls,
void* ClientControls);
C, "WLDAP32.dll");
// $ffi->ldap_compare_ext_sA(ld, dn, Attr, Value, Data, ServerControls, ClientControls);
// ld : LDAP* in/out
// dn : LPCSTR
// Attr : LPCSTR
// Value : LPCSTR optional
// Data : LDAP_BERVAL* optional
// ServerControls : LDAPControlA** in/out
// ClientControls : LDAPControlA** in/out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Wldap32 extends Library {
Wldap32 INSTANCE = Native.load("wldap32", Wldap32.class, W32APIOptions.ASCII_OPTIONS);
int ldap_compare_ext_sA(
Pointer ld, // LDAP* in/out
String dn, // LPCSTR
String Attr, // LPCSTR
String Value, // LPCSTR optional
Pointer Data, // LDAP_BERVAL* optional
Pointer ServerControls, // LDAPControlA** in/out
Pointer ClientControls // LDAPControlA** in/out
);
}@[Link("wldap32")]
lib LibWLDAP32
fun ldap_compare_ext_sA = ldap_compare_ext_sA(
ld : LDAP*, # LDAP* in/out
dn : UInt8*, # LPCSTR
Attr : UInt8*, # LPCSTR
Value : UInt8*, # LPCSTR optional
Data : LDAP_BERVAL*, # LDAP_BERVAL* optional
ServerControls : LDAPControlA**, # LDAPControlA** in/out
ClientControls : LDAPControlA** # LDAPControlA** in/out
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef ldap_compare_ext_sANative = Uint32 Function(Pointer<Void>, Pointer<Utf8>, Pointer<Utf8>, Pointer<Utf8>, Pointer<Void>, Pointer<Void>, Pointer<Void>);
typedef ldap_compare_ext_sADart = int Function(Pointer<Void>, Pointer<Utf8>, Pointer<Utf8>, Pointer<Utf8>, Pointer<Void>, Pointer<Void>, Pointer<Void>);
final ldap_compare_ext_sA = DynamicLibrary.open('WLDAP32.dll')
.lookupFunction<ldap_compare_ext_sANative, ldap_compare_ext_sADart>('ldap_compare_ext_sA');
// ld : LDAP* in/out -> Pointer<Void>
// dn : LPCSTR -> Pointer<Utf8>
// Attr : LPCSTR -> Pointer<Utf8>
// Value : LPCSTR optional -> Pointer<Utf8>
// Data : LDAP_BERVAL* optional -> Pointer<Void>
// ServerControls : LDAPControlA** in/out -> Pointer<Void>
// ClientControls : LDAPControlA** in/out -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function ldap_compare_ext_sA(
ld: Pointer; // LDAP* in/out
dn: PAnsiChar; // LPCSTR
Attr: PAnsiChar; // LPCSTR
Value: PAnsiChar; // LPCSTR optional
Data: Pointer; // LDAP_BERVAL* optional
ServerControls: Pointer; // LDAPControlA** in/out
ClientControls: Pointer // LDAPControlA** in/out
): DWORD; cdecl;
external 'WLDAP32.dll' name 'ldap_compare_ext_sA';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import ccall safe "ldap_compare_ext_sA"
c_ldap_compare_ext_sA :: Ptr () -> CString -> CString -> CString -> Ptr () -> Ptr () -> Ptr () -> IO Word32
-- ld : LDAP* in/out -> Ptr ()
-- dn : LPCSTR -> CString
-- Attr : LPCSTR -> CString
-- Value : LPCSTR optional -> CString
-- Data : LDAP_BERVAL* optional -> Ptr ()
-- ServerControls : LDAPControlA** in/out -> Ptr ()
-- ClientControls : LDAPControlA** in/out -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let ldap_compare_ext_sa =
foreign "ldap_compare_ext_sA"
((ptr void) @-> string @-> string @-> string @-> (ptr void) @-> (ptr void) @-> (ptr void) @-> returning uint32_t)
(* ld : LDAP* in/out -> (ptr void) *)
(* dn : LPCSTR -> string *)
(* Attr : LPCSTR -> string *)
(* Value : LPCSTR optional -> string *)
(* Data : LDAP_BERVAL* optional -> (ptr void) *)
(* ServerControls : LDAPControlA** in/out -> (ptr void) *)
(* ClientControls : LDAPControlA** in/out -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library wldap32 (t "WLDAP32.dll"))
(cffi:use-foreign-library wldap32)
(cffi:defcfun ("ldap_compare_ext_sA" ldap-compare-ext-s-a :convention :cdecl) :uint32
(ld :pointer) ; LDAP* in/out
(dn :string) ; LPCSTR
(attr :string) ; LPCSTR
(value :string) ; LPCSTR optional
(data :pointer) ; LDAP_BERVAL* optional
(server-controls :pointer) ; LDAPControlA** in/out
(client-controls :pointer)) ; LDAPControlA** in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $ldap_compare_ext_sA = Win32::API::More->new('WLDAP32',
'DWORD ldap_compare_ext_sA(LPVOID ld, LPCSTR dn, LPCSTR Attr, LPCSTR Value, LPVOID Data, LPVOID ServerControls, LPVOID ClientControls)');
# my $ret = $ldap_compare_ext_sA->Call($ld, $dn, $Attr, $Value, $Data, $ServerControls, $ClientControls);
# ld : LDAP* in/out -> LPVOID
# dn : LPCSTR -> LPCSTR
# Attr : LPCSTR -> LPCSTR
# Value : LPCSTR optional -> LPCSTR
# Data : LDAP_BERVAL* optional -> LPVOID
# ServerControls : LDAPControlA** in/out -> LPVOID
# ClientControls : LDAPControlA** in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
文字セット違い
- f ldap_compare_ext_sW (Unicode版) — コントロール付きで属性値を同期的に比較する拡張版(Unicode版)。