LDAP running on Window CE device always returning LDAP_LOCAL_ERROR

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi:

I am debugging a code snippet that runs on my PC, but not on by Windows CE
(ARMV4I) device. It fails on the first call, ldap_init with a
LDAP_LOCAL_ERROR. I changed to ldap_open and this fails too with the same
error.

pLdapConnection = ldap_open( TEXT("server.ldap.com"), LDAP_PORT );

I traced into the assembly code and kind of followed it down this path:

ldap_open
LdapConnectionOpen
LdapAllocateConnection
LdapInitializeWinsock
LdapInitSecurity
CreateEventW
ldapMalloc
CloseHandle
SetLastError
and goes to exitWithError all the way back out to ldap_open.

It appears to be failing on ldapMalloc. But, I don't seem to understand why
this code would fail this way. Does anyone have any ideas?

Thank you,

David.
.