I'm currently working with the Windows LDAP library wldap32, and it looks promising so far.
(I'll post my results as soon as i'm ready)
I have a question though.
If i write my code without procedures everything works fine but if i try to separate the elements inside procedures it crashes.
For example, this works:
Code: Select all
Prototype.i Proto_ldap_init(Domain$, PortNumber.l)
LibNr.i = OpenLibrary(#PB_Any, "wldap32.dll")
If LibNr
CompilerSelect #PB_Compiler_Unicode
CompilerCase 0
LdapInit.Proto_ldap_init = GetFunction(LibNr, "ldap_initA")
CompilerCase 1
LdapInit.Proto_ldap_init = GetFunction(LibNr, "ldap_initW")
CompilerEndSelect
Else
MessageRequester("Error", "Unable to open the LDAP library", 16) : End
EndIf
*ld = LdapInit("MyDomain", 389)
Debug *ld
Code: Select all
Prototype.i Proto_ldap_init(Domain$, PortNumber.l)
LibNr.i = OpenLibrary(#PB_Any, "wldap32.dll")
If LibNr
CompilerSelect #PB_Compiler_Unicode
CompilerCase 0
Global LdapInit.Proto_ldap_init = GetFunction(LibNr, "ldap_initA")
CompilerCase 1
Global LdapInit.Proto_ldap_init = GetFunction(LibNr, "ldap_initW")
CompilerEndSelect
Else
MessageRequester("Error", "Unable to open the LDAP library", 16) : End
EndIf
Procedure.i LDAP_INIT(Domainname$, PortNumber.l)
*ld = LdapInit(Domainname$, PortNumber.l)
ProcedureReturn *ld
EndProcedure
Debug LDAP_INIT("MyDomain", 389)
Thanks for the help
TeddyLM