RE: LDAP running on Window CE device always returning LDAP_LOCAL_E

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



Hi:

I guess I'm all alone on this one. I was able to get this to work using an
undocumented function called ldap_startup. Once this was called, the heap
handle was created.

Every code example I have seen does not use this function. It is not needed
on Win32 PC. Is the ldap_startup function hiding some other issue? I am
concerned about the fact that an undocumented API is required on Window CE.
Can anyone shed light on this?

Thank you,

David.

"David Miller" wrote:

> Hi:
>
> Not giving up. I know what the issue is now. I realized that
> HeapAllocTrace really is HeapAlloc. The arguments being passed within the
> ldap code are
>
> HeapAllocTrace(0, 8, 538). The problem is the first argument set to a null
> handle.
>
> I confirmed this by adding the following line of code before my call to
> ldap_init or ldap_open.
>
> LPVOID lpValue = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 538);
>
> This code correctly allocated memory. So, while debugging, I pulled the
> handle value from this call and inserted it into the call from ldap_init and
> ldap_open, and it successfully allocated memory.
>
> So, now the question is, where does the ldap code get its heap handle from
> and how do it get it to be non-null? Hopefully, this is easier to answer.
>
> Thank you,
>
> David.
>
> "David Miller" wrote:
>
.