Dmitry Timoshkov : adsldp: Add special column "ADsPath" at the end of the entry.
Alexandre Julliard
julliard at winehq.org
Thu Mar 26 16:27:25 CDT 2020
Module: wine
Branch: master
Commit: e53a00944e1f494e36fdb72356463f038af5de23
URL: https://source.winehq.org/git/wine.git/?a=commit;h=e53a00944e1f494e36fdb72356463f038af5de23
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Thu Mar 26 15:10:04 2020 +0800
adsldp: Add special column "ADsPath" at the end of the entry.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/adsldp/adsldp.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
index b59b31b21a..859d42546f 100644
--- a/dlls/adsldp/adsldp.c
+++ b/dlls/adsldp/adsldp.c
@@ -401,6 +401,7 @@ struct ldap_search_context
LDAPMessage *res, *entry;
BerElement *ber;
ULONG count, pos;
+ BOOL add_ADsPath;
};
static inline LDAP_namespace *impl_from_IADs(IADs *iface)
@@ -1274,7 +1275,10 @@ static HRESULT WINAPI search_GetNextColumnName(IDirectorySearch *iface, ADS_SEAR
if (!name || !ldap_ctx || !ldap_ctx->entry) return E_ADS_BAD_PARAMETER;
if (!ldap_ctx->ber)
+ {
attr = ldap_first_attributeW(ldap->ld, ldap_ctx->entry, &ldap_ctx->ber);
+ ldap_ctx->add_ADsPath = TRUE;
+ }
else
attr = ldap_next_attributeW(ldap->ld, ldap_ctx->entry, ldap_ctx->ber);
@@ -1285,6 +1289,13 @@ static HRESULT WINAPI search_GetNextColumnName(IDirectorySearch *iface, ADS_SEAR
ldap_memfreeW(attr);
return *name ? S_OK : E_OUTOFMEMORY;
}
+ else if (ldap_ctx->add_ADsPath)
+ {
+ ldap_ctx->add_ADsPath = FALSE;
+ *name = AllocADsStr((WCHAR *)L"ADsPath");
+ TRACE("=> %s\n", debugstr_w(*name));
+ return *name ? S_OK : E_OUTOFMEMORY;
+ }
*name = NULL;
return S_ADS_NOMORE_COLUMNS;
More information about the wine-cvs
mailing list