activeds: ADsOpenObject should return E_FAIL by default.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3eb581db43
commit
2a1841f5cf
|
@ -127,10 +127,10 @@ HRESULT WINAPI ADsOpenObject(LPCWSTR path, LPCWSTR user, LPCWSTR password, DWORD
|
|||
if (!path || !riid || !obj)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\ADs\\Providers", 0, KEY_READ, &hkey))
|
||||
return E_ADS_BAD_PATHNAME;
|
||||
hr = E_FAIL;
|
||||
|
||||
hr = E_ADS_BAD_PATHNAME;
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\ADs\\Providers", 0, KEY_READ, &hkey))
|
||||
return hr;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TESTDLL = adsldp.dll
|
||||
IMPORTS = ole32 oleaut32 secur32 advapi32 uuid
|
||||
IMPORTS = ole32 oleaut32 secur32 advapi32 activeds uuid
|
||||
|
||||
C_SRCS = \
|
||||
ldap.c \
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "objbase.h"
|
||||
#include "iads.h"
|
||||
#include "adserr.h"
|
||||
#include "adshlp.h"
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
|
@ -98,6 +99,11 @@ static void test_LDAP(void)
|
|||
if (hr == S_OK)
|
||||
IDispatch_Release(disp);
|
||||
|
||||
hr = ADsOpenObject(path, user, password, test[i].flags, &IID_IADs, (void **)&ads);
|
||||
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)
|
||||
IADs_Release(ads);
|
||||
|
||||
SysFreeString(path);
|
||||
SysFreeString(user);
|
||||
SysFreeString(password);
|
||||
|
|
Loading…
Reference in New Issue