winldap.h should include windeh.f and schnlsp.h.

Enclose the API definitions in an extern "C" section and define
LDAPAPI.
Better stick to the types defined by the PSDK.
Fix the ldap_create_vlv_control*() prototypes.
Update win32.api.
This commit is contained in:
Francois Gouget 2005-11-23 20:12:07 +01:00 committed by Alexandre Julliard
parent cc01e8ff05
commit f667584aac
5 changed files with 34 additions and 12 deletions

View File

@ -162,7 +162,7 @@ ULONG ldap_create_sort_controlW( WLDAP32_LDAP *ld, PLDAPSortKeyW *sortkey,
} }
INT ldap_create_vlv_controlA( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info, INT ldap_create_vlv_controlA( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
char critical, LDAPControlA **control ) UCHAR critical, LDAPControlA **control )
{ {
INT ret = LDAP_NOT_SUPPORTED; INT ret = LDAP_NOT_SUPPORTED;
#ifdef HAVE_LDAP #ifdef HAVE_LDAP
@ -182,7 +182,7 @@ INT ldap_create_vlv_controlA( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
} }
INT ldap_create_vlv_controlW( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info, INT ldap_create_vlv_controlW( WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info,
char critical, LDAPControlW **control ) UCHAR critical, LDAPControlW **control )
{ {
INT ret = LDAP_NOT_SUPPORTED; INT ret = LDAP_NOT_SUPPORTED;
#ifdef HAVE_LDAP #ifdef HAVE_LDAP

View File

@ -264,7 +264,7 @@ exit:
return NULL; return NULL;
} }
ULONG ldap_connect( WLDAP32_LDAP *ld, LDAP_TIMEVAL *timeout ) ULONG ldap_connect( WLDAP32_LDAP *ld, struct l_timeval *timeout )
{ {
TRACE( "(%p, %p)\n", ld, timeout ); TRACE( "(%p, %p)\n", ld, timeout );

View File

@ -291,8 +291,8 @@ ULONG ldap_create_page_controlA(WLDAP32_PLDAP,ULONG,struct WLDAP32_berval*,UCHAR
ULONG ldap_create_page_controlW(WLDAP32_PLDAP,ULONG,struct WLDAP32_berval*,UCHAR,PLDAPControlW*); ULONG ldap_create_page_controlW(WLDAP32_PLDAP,ULONG,struct WLDAP32_berval*,UCHAR,PLDAPControlW*);
ULONG ldap_create_sort_controlA(WLDAP32_PLDAP,PLDAPSortKeyA*,UCHAR,PLDAPControlA*); ULONG ldap_create_sort_controlA(WLDAP32_PLDAP,PLDAPSortKeyA*,UCHAR,PLDAPControlA*);
ULONG ldap_create_sort_controlW(WLDAP32_PLDAP,PLDAPSortKeyW*,UCHAR,PLDAPControlW*); ULONG ldap_create_sort_controlW(WLDAP32_PLDAP,PLDAPSortKeyW*,UCHAR,PLDAPControlW*);
INT ldap_create_vlv_controlA(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,char,LDAPControlA**); INT ldap_create_vlv_controlA(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,UCHAR,LDAPControlA**);
INT ldap_create_vlv_controlW(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,char,LDAPControlW**); INT ldap_create_vlv_controlW(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,UCHAR,LDAPControlW**);
ULONG ldap_deleteA(WLDAP32_LDAP*,PCHAR); ULONG ldap_deleteA(WLDAP32_LDAP*,PCHAR);
ULONG ldap_deleteW(WLDAP32_LDAP*,PWCHAR); ULONG ldap_deleteW(WLDAP32_LDAP*,PWCHAR);
ULONG ldap_delete_extA(WLDAP32_LDAP*,PCHAR,PLDAPControlA*,PLDAPControlA*,ULONG*); ULONG ldap_delete_extA(WLDAP32_LDAP*,PCHAR,PLDAPControlA*,PLDAPControlA*,ULONG*);

View File

@ -19,6 +19,14 @@
#ifndef __WINE_WINLDAP_H #ifndef __WINE_WINLDAP_H
#define __WINE_WINLDAP_H #define __WINE_WINLDAP_H
#include <windef.h>
#include <schnlsp.h>
#ifndef LDAPAPI
#define LDAPAPI __cdecl
#endif
typedef enum { typedef enum {
LDAP_SUCCESS = 0x00, LDAP_SUCCESS = 0x00,
LDAP_OPERATIONS_ERROR = 0x01, LDAP_OPERATIONS_ERROR = 0x01,
@ -361,6 +369,11 @@ typedef struct ldap_apifeature_infoW
DECL_WINELIB_TYPE_AW(LDAPAPIFeatureInfo) DECL_WINELIB_TYPE_AW(LDAPAPIFeatureInfo)
#ifdef __cplusplus
extern "C" {
#endif
LDAP *cldap_openA(PCHAR,ULONG); LDAP *cldap_openA(PCHAR,ULONG);
LDAP *cldap_openW(PWCHAR,ULONG); LDAP *cldap_openW(PWCHAR,ULONG);
#define cldap_open WINELIB_NAME_AW(cldap_open) #define cldap_open WINELIB_NAME_AW(cldap_open)
@ -401,7 +414,7 @@ ULONG ldap_compare_ext_sW(LDAP*,PWCHAR,PWCHAR,PWCHAR,struct berval*,PLDAPControl
ULONG ldap_compare_sA(LDAP*,PCHAR,PCHAR,PCHAR); ULONG ldap_compare_sA(LDAP*,PCHAR,PCHAR,PCHAR);
ULONG ldap_compare_sW(LDAP*,PWCHAR,PWCHAR,PWCHAR); ULONG ldap_compare_sW(LDAP*,PWCHAR,PWCHAR,PWCHAR);
#define ldap_compare_s WINELIB_NAME_AW(ldap_compare_s) #define ldap_compare_s WINELIB_NAME_AW(ldap_compare_s)
ULONG ldap_connect(LDAP*,LDAP_TIMEVAL*); ULONG ldap_connect(LDAP*,struct l_timeval*);
ULONG ldap_control_freeA(LDAPControlA*); ULONG ldap_control_freeA(LDAPControlA*);
ULONG ldap_control_freeW(LDAPControlW*); ULONG ldap_control_freeW(LDAPControlW*);
#define ldap_control_free WINELIB_NAME_AW(ldap_control_free) #define ldap_control_free WINELIB_NAME_AW(ldap_control_free)
@ -420,8 +433,8 @@ ULONG ldap_create_page_controlW(PLDAP,ULONG,struct berval*,UCHAR,PLDAPControlW*)
ULONG ldap_create_sort_controlA(PLDAP,PLDAPSortKeyA*,UCHAR,PLDAPControlA*); ULONG ldap_create_sort_controlA(PLDAP,PLDAPSortKeyA*,UCHAR,PLDAPControlA*);
ULONG ldap_create_sort_controlW(PLDAP,PLDAPSortKeyW*,UCHAR,PLDAPControlW*); ULONG ldap_create_sort_controlW(PLDAP,PLDAPSortKeyW*,UCHAR,PLDAPControlW*);
#define ldap_create_sort_control WINELIB_NAME_AW(ldap_create_sort_control) #define ldap_create_sort_control WINELIB_NAME_AW(ldap_create_sort_control)
INT ldap_create_vlv_controlA(LDAP*,LDAPVLVInfo*,char,LDAPControlA**); INT ldap_create_vlv_controlA(PLDAP,PLDAPVLVInfo,UCHAR,PLDAPControlA*);
INT ldap_create_vlv_controlW(LDAP*,LDAPVLVInfo*,char,LDAPControlW**); INT ldap_create_vlv_controlW(PLDAP,PLDAPVLVInfo,UCHAR,PLDAPControlW*);
#define ldap_create_vlv_control WINELIB_NAME_AW(ldap_create_vlv_control) #define ldap_create_vlv_control WINELIB_NAME_AW(ldap_create_vlv_control)
ULONG ldap_deleteA(LDAP*,PCHAR); ULONG ldap_deleteA(LDAP*,PCHAR);
ULONG ldap_deleteW(LDAP*,PWCHAR); ULONG ldap_deleteW(LDAP*,PWCHAR);
@ -533,8 +546,8 @@ ULONG ldap_parse_resultW(LDAP*,LDAPMessage*,ULONG*,PWCHAR*,PWCHAR*,PWCHAR**,PLDA
ULONG ldap_parse_sort_controlA(LDAP*,PLDAPControlA*,ULONG*,PCHAR*); ULONG ldap_parse_sort_controlA(LDAP*,PLDAPControlA*,ULONG*,PCHAR*);
ULONG ldap_parse_sort_controlW(LDAP*,PLDAPControlW*,ULONG*,PWCHAR*); ULONG ldap_parse_sort_controlW(LDAP*,PLDAPControlW*,ULONG*,PWCHAR*);
#define ldap_parse_sort_control WINELIB_NAME_AW(ldap_parse_sort_control) #define ldap_parse_sort_control WINELIB_NAME_AW(ldap_parse_sort_control)
int ldap_parse_vlv_controlA(LDAP*,LDAPControlA**,unsigned long*,unsigned long*,struct berval**,int*); int ldap_parse_vlv_controlA(LDAP*,PLDAPControlA*,unsigned long*,unsigned long*,struct berval**,int*);
int ldap_parse_vlv_controlW(LDAP*,LDAPControlW**,unsigned long*,unsigned long*,struct berval**,int*); int ldap_parse_vlv_controlW(LDAP*,PLDAPControlW*,unsigned long*,unsigned long*,struct berval**,int*);
#define ldap_parse_vlv_control WINELIB_NAME_AW(ldap_parse_vlv_control) #define ldap_parse_vlv_control WINELIB_NAME_AW(ldap_parse_vlv_control)
void ldap_perror(LDAP*,const PCHAR); void ldap_perror(LDAP*,const PCHAR);
ULONG ldap_rename_extA(LDAP*,PCHAR,PCHAR,PCHAR,INT,PLDAPControlA*,PLDAPControlA*,ULONG*); ULONG ldap_rename_extA(LDAP*,PCHAR,PCHAR,PCHAR,INT,PLDAPControlA*,PLDAPControlA*,ULONG*);
@ -593,7 +606,7 @@ LDAP *ldap_sslinitW(PWCHAR,ULONG,int);
ULONG ldap_start_tls_sA(LDAP*,PULONG,LDAPMessage**,PLDAPControlA*,PLDAPControlA*); ULONG ldap_start_tls_sA(LDAP*,PULONG,LDAPMessage**,PLDAPControlA*,PLDAPControlA*);
ULONG ldap_start_tls_sW(LDAP*,PULONG,LDAPMessage**,PLDAPControlW*,PLDAPControlW*); ULONG ldap_start_tls_sW(LDAP*,PULONG,LDAPMessage**,PLDAPControlW*,PLDAPControlW*);
#define ldap_start_tls_s WINELIB_NAME_AW(ldap_start_tls_s) #define ldap_start_tls_s WINELIB_NAME_AW(ldap_start_tls_s)
ULONG ldap_startup(LDAP_VERSION_INFO*,HANDLE*); ULONG ldap_startup(PLDAP_VERSION_INFO,HANDLE*);
BOOLEAN ldap_stop_tls_s(LDAP*); BOOLEAN ldap_stop_tls_s(LDAP*);
ULONG ldap_ufn2dnA(PCHAR,PCHAR*); ULONG ldap_ufn2dnA(PCHAR,PCHAR*);
ULONG ldap_ufn2dnW(PWCHAR,PWCHAR*); ULONG ldap_ufn2dnW(PWCHAR,PWCHAR*);
@ -624,4 +637,8 @@ ULONG LdapMapErrorToWin32(ULONG);
int LdapUnicodeToUTF8(LPCWSTR,int,LPSTR,int); int LdapUnicodeToUTF8(LPCWSTR,int,LPSTR,int);
int LdapUTF8ToUnicode(LPCSTR,int,LPWSTR,int); int LdapUTF8ToUnicode(LPCSTR,int,LPWSTR,int);
#ifdef __cplusplus
}
#endif
#endif /* __WINE_WINLDAP_H */ #endif /* __WINE_WINLDAP_H */

View File

@ -5074,6 +5074,7 @@ void
%long %long
BOOLEAN
INT INT
HANDLE HANDLE
UCHAR UCHAR
@ -5085,17 +5086,20 @@ int
BerElement * BerElement *
BERVAL * BERVAL *
CHAR ** CHAR **
HANDLE *
LDAPControlA * LDAPControlA *
LDAPControlA ** LDAPControlA **
LDAPControlW * LDAPControlW *
LDAPControlW ** LDAPControlW **
LDAPModA *[] LDAPModA *[]
LDAPModW *[] LDAPModW *[]
LDAP_TIMEVAL *
PBERVAL * PBERVAL *
PCHAR * PCHAR *
PCHAR[] PCHAR[]
PLDAP_VERSION_INFO
PLDAPControlA
PLDAPControlA * PLDAPControlA *
PLDAPControlW
PLDAPControlW * PLDAPControlW *
PLDAPSortKeyA * PLDAPSortKeyA *
PLDAPSortKeyW * PLDAPSortKeyW *
@ -5108,6 +5112,7 @@ WLDAP32_BerElement **
WLDAP32_LDAP * WLDAP32_LDAP *
WLDAP32_LDAPMessage * WLDAP32_LDAPMessage *
WLDAP32_LDAPMessage ** WLDAP32_LDAPMessage **
WLDAP32_LDAPVLVInfo *
int * int *
struct WLDAP32_berval * struct WLDAP32_berval *
struct WLDAP32_berval ** struct WLDAP32_berval **