[Date Prev][Date Next] [Chronological] [Thread] [Top]

LDAP simple query in C doesn't work

Hi there,

I'm wandering if anyone is going to be able to help with this query.
Basically I've created a very simple appliaction to help resolve a problem
I have in my main application.  The application written in C, executing on
an NT application platform, always crashes with a memory violation dump.
I've tried using two different API's (ldap_search_s and ldap_search_ext_s)
but get the same problem.

I'm trying to pass in a list of attributes to retrieve.  If I pass in NULL
everything works fine.  Can't quite work out what I'm doing wrong - must
have something to do with the way I'm setting up my attribute list
(variable "attrs" in the code).  I'm attaching the C source code (very
small piece of code) - hopefully someone will see a silly error and point
me in the right direction!

Thanks in advance,


(See attached file: ldap_simple.c)

Attachment: ldap_simple.c
Description: Binary data