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)
|
if (!path || !riid || !obj)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\ADs\\Providers", 0, KEY_READ, &hkey))
|
hr = E_FAIL;
|
||||||
return E_ADS_BAD_PATHNAME;
|
|
||||||
|
|
||||||
hr = E_ADS_BAD_PATHNAME;
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\ADs\\Providers", 0, KEY_READ, &hkey))
|
||||||
|
return hr;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
TESTDLL = adsldp.dll
|
TESTDLL = adsldp.dll
|
||||||
IMPORTS = ole32 oleaut32 secur32 advapi32 uuid
|
IMPORTS = ole32 oleaut32 secur32 advapi32 activeds uuid
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
ldap.c \
|
ldap.c \
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "objbase.h"
|
#include "objbase.h"
|
||||||
#include "iads.h"
|
#include "iads.h"
|
||||||
#include "adserr.h"
|
#include "adserr.h"
|
||||||
|
#include "adshlp.h"
|
||||||
|
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
@ -98,6 +99,11 @@ static void test_LDAP(void)
|
||||||
if (hr == S_OK)
|
if (hr == S_OK)
|
||||||
IDispatch_Release(disp);
|
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(path);
|
||||||
SysFreeString(user);
|
SysFreeString(user);
|
||||||
SysFreeString(password);
|
SysFreeString(password);
|
||||||
|
|
Loading…
Reference in New Issue