Author: akhaldi
Date: Sat Mar 5 11:01:59 2016
New Revision: 70950
URL:
http://svn.reactos.org/svn/reactos?rev=70950&view=rev
Log:
[WLDAP32] Sync with Wine Staging 1.9.4. CORE-10912
Modified:
trunk/reactos/dll/win32/wldap32/control.c
trunk/reactos/dll/win32/wldap32/wldap32.h
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/wldap32/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wldap32/control.…
==============================================================================
--- trunk/reactos/dll/win32/wldap32/control.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wldap32/control.c [iso-8859-1] Sat Mar 5 11:01:59 2016
@@ -258,15 +258,37 @@
return ret;
}
+static inline void bv_val_dup( const struct WLDAP32_berval *src, struct WLDAP32_berval
*dst )
+{
+ dst->bv_val = HeapAlloc( GetProcessHeap(), 0, src->bv_len );
+ if (dst->bv_val)
+ {
+ memcpy( dst->bv_val, src->bv_val, src->bv_len );
+ dst->bv_len = src->bv_len;
+ }
+ else
+ dst->bv_len = 0;
+}
+
/***********************************************************************
* ldap_encode_sort_controlA (WLDAP32.@)
*
* See ldap_encode_sort_controlW.
*/
ULONG CDECL ldap_encode_sort_controlA( WLDAP32_LDAP *ld, PLDAPSortKeyA *sortkeys,
- PLDAPControlA control, BOOLEAN critical )
-{
- return ldap_create_sort_controlA( ld, sortkeys, critical, &control );
+ PLDAPControlA ret, BOOLEAN critical )
+{
+ LDAPControlA *control = NULL;
+ ULONG result;
+
+ if ((result = ldap_create_sort_controlA( ld, sortkeys, critical, &control )) ==
WLDAP32_LDAP_SUCCESS)
+ {
+ ret->ldctl_oid = strdupU(control->ldctl_oid);
+ bv_val_dup( &control->ldctl_value, &ret->ldctl_value );
+ ret->ldctl_iscritical = control->ldctl_iscritical;
+ ldap_control_freeA( control );
+ }
+ return result;
}
/***********************************************************************
@@ -292,9 +314,19 @@
* ldap_create_sort_control instead.
*/
ULONG CDECL ldap_encode_sort_controlW( WLDAP32_LDAP *ld, PLDAPSortKeyW *sortkeys,
- PLDAPControlW control, BOOLEAN critical )
-{
- return ldap_create_sort_controlW( ld, sortkeys, critical, &control );
+ PLDAPControlW ret, BOOLEAN critical )
+{
+ LDAPControlW *control = NULL;
+ ULONG result;
+
+ if ((result = ldap_create_sort_controlW( ld, sortkeys, critical, &control )) ==
WLDAP32_LDAP_SUCCESS)
+ {
+ ret->ldctl_oid = strdupW(control->ldctl_oid);
+ bv_val_dup( &control->ldctl_value, &ret->ldctl_value );
+ ret->ldctl_iscritical = control->ldctl_iscritical;
+ ldap_control_freeW( control );
+ }
+ return result;
}
/***********************************************************************
Modified: trunk/reactos/dll/win32/wldap32/wldap32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wldap32/wldap32.…
==============================================================================
--- trunk/reactos/dll/win32/wldap32/wldap32.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wldap32/wldap32.h [iso-8859-1] Sat Mar 5 11:01:59 2016
@@ -20,6 +20,8 @@
#pragma once
+#include <wine/unicode.h>
+
extern HINSTANCE hwldap32 DECLSPEC_HIDDEN;
ULONG map_error( int ) DECLSPEC_HIDDEN;
@@ -36,6 +38,17 @@
dst = HeapAlloc( GetProcessHeap(), 0, (strlen( src ) + 1) * sizeof(char) );
if (dst)
strcpy( dst, src );
+ return dst;
+}
+
+static inline WCHAR *strdupW( const WCHAR *src )
+{
+ WCHAR *dst;
+
+ if (!src) return NULL;
+ dst = HeapAlloc( GetProcessHeap(), 0, (strlenW( src ) + 1) * sizeof(WCHAR) );
+ if (dst)
+ strcpyW( dst, src );
return dst;
}
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Mar 5 11:01:59 2016
@@ -211,7 +211,7 @@
reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628
reactos/dll/win32/winscard # Synced to WineStaging-1.7.55
reactos/dll/win32/wintrust # Synced to WineStaging-1.7.55
-reactos/dll/win32/wldap32 # Synced to WineStaging-1.7.55
+reactos/dll/win32/wldap32 # Synced to WineStaging-1.9.4
reactos/dll/win32/wmi # Synced to WineStaging-1.7.55
reactos/dll/win32/wmiutils # Synced to WineStaging-1.7.55
reactos/dll/win32/wmvcore # Synced to WineStaging-1.7.55