* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "config.h"
+#include "wine/port.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+#ifdef HAVE_LDAP_H
+#include <ldap.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnls.h"
+
#include "winldap_private.h"
+#include "wldap32.h"
+#include "wine/debug.h"
#ifdef HAVE_LDAP
/* Should eventually be determined by the algorithm documented on MSDN. */
p++;
}
- res = HeapAlloc( GetProcessHeap(), 0, (i + 1) * sizeof(char *) );
- if (!res)
+ if (!(res = heap_alloc( (i + 1) * sizeof(char *) )))
{
- HeapFree( GetProcessHeap(), 0, str );
+ heap_free( str );
return NULL;
}
q = p;
i = 0;
-
+
while (*p)
{
if (p[1] != '\0')
res[i] = strdupU( q );
if (!res[i]) goto oom;
i++;
-
+
while (isspace( *p )) p++;
q = p;
}
}
res[i] = NULL;
- HeapFree( GetProcessHeap(), 0, str );
+ heap_free( str );
return res;
oom:
while (i > 0) strfreeU( res[--i] );
- HeapFree( GetProcessHeap(), 0, res );
- HeapFree( GetProcessHeap(), 0, str );
+ heap_free( res );
+ heap_free( str );
return NULL;
}
}
size += (i - 1) * strlen( sep );
-
- res = HeapAlloc( GetProcessHeap(), 0, size + 1 );
- if (!res) return NULL;
+ if (!(res = heap_alloc( size + 1 ))) return NULL;
p = res;
for (v = hostnames; *v; v++)
}
#endif
+WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
+
#ifdef HAVE_LDAP
static LDAP *create_context( const char *url )
{