forked from Mirrors/wine-wine
adsldp: Forward IDirectoryObject::QueryInterface() to parent.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
c1e282d0f9
commit
0d49dcd39f
|
@ -1573,6 +1573,8 @@ static inline LDAP_namespace *impl_from_IDirectoryObject(IDirectoryObject *iface
|
|||
|
||||
static HRESULT WINAPI dirobj_QueryInterface(IDirectoryObject *iface, REFIID riid, void **obj)
|
||||
{
|
||||
LDAP_namespace *ldap = impl_from_IDirectoryObject(iface);
|
||||
|
||||
TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
|
||||
|
||||
if (!riid || !obj) return E_INVALIDARG;
|
||||
|
@ -1585,8 +1587,7 @@ static HRESULT WINAPI dirobj_QueryInterface(IDirectoryObject *iface, REFIID riid
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
FIXME("interface %s is not implemented\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
return IADs_QueryInterface(&ldap->IADs_iface, riid, obj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI dirobj_AddRef(IDirectoryObject *iface)
|
||||
|
|
|
@ -459,6 +459,37 @@ todo_wine
|
|||
do_search(&scientists_subtree);
|
||||
}
|
||||
|
||||
static void test_DirectoryObject(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
IDirectoryObject *dirobj;
|
||||
IUnknown *unk;
|
||||
IDirectorySearch *ds;
|
||||
|
||||
hr = ADsGetObject(L"LDAP://ldap.forumsys.com/OU=scientists,DC=example,DC=com", &IID_IDirectoryObject, (void **)&dirobj);
|
||||
if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN))
|
||||
{
|
||||
skip("server is down\n");
|
||||
return;
|
||||
}
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
|
||||
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IADsOpenDSObject, (void **)&unk);
|
||||
todo_wine
|
||||
ok(hr == E_NOINTERFACE, "got %#x\n", hr);
|
||||
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IDispatch, (void **)&unk);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
IUnknown_Release(unk);
|
||||
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IADs, (void **)&unk);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
IUnknown_Release(unk);
|
||||
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IDirectorySearch, (void **)&ds);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
IDirectorySearch_Release(ds);
|
||||
|
||||
IDirectoryObject_Release(dirobj);
|
||||
}
|
||||
|
||||
START_TEST(ldap)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
@ -469,6 +500,7 @@ START_TEST(ldap)
|
|||
test_LDAP();
|
||||
test_ParseDisplayName();
|
||||
test_DirectorySearch();
|
||||
test_DirectoryObject();
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue