Dmitry Timoshkov : activeds: Implement ADsGetObject.
Alexandre Julliard
julliard at winehq.org
Thu Mar 19 16:27:49 CDT 2020
Module: wine
Branch: master
Commit: 18d7356f0ca1c07f09cfcf0de6a9b61349fc257a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=18d7356f0ca1c07f09cfcf0de6a9b61349fc257a
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Fri Mar 13 11:53:34 2020 +0800
activeds: Implement ADsGetObject.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/activeds/activeds_main.c | 10 +++++++---
dlls/adsldp/tests/ldap.c | 5 +++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/activeds/activeds_main.c b/dlls/activeds/activeds_main.c
index 564acab93e..6a825f0913 100644
--- a/dlls/activeds/activeds_main.c
+++ b/dlls/activeds/activeds_main.c
@@ -61,10 +61,14 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
/*****************************************************
* ADsGetObject [ACTIVEDS.3]
*/
-HRESULT WINAPI ADsGetObject(LPCWSTR lpszPathName, REFIID riid, VOID** ppObject)
+HRESULT WINAPI ADsGetObject(LPCWSTR path, REFIID riid, void **obj)
{
- FIXME("(%s)->(%s,%p)!stub\n",debugstr_w(lpszPathName), debugstr_guid(riid), ppObject);
- return E_NOTIMPL;
+ HRESULT hr;
+
+ hr = ADsOpenObject(path, NULL, NULL, ADS_SECURE_AUTHENTICATION, riid, obj);
+ if (hr != S_OK)
+ hr = ADsOpenObject(path, NULL, NULL, 0, riid, obj);
+ return hr;
}
/*****************************************************
diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c
index e0e562e8bf..28e41e4d95 100644
--- a/dlls/adsldp/tests/ldap.c
+++ b/dlls/adsldp/tests/ldap.c
@@ -104,6 +104,11 @@ static void test_LDAP(void)
if (hr == S_OK)
IADs_Release(ads);
+ hr = ADsGetObject(path, &IID_IDispatch, (void **)&disp);
+ ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr);
+ if (hr == S_OK)
+ IDispatch_Release(disp);
+
SysFreeString(path);
SysFreeString(user);
SysFreeString(password);
More information about the wine-cvs
mailing list