Commit 2a1841f5 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

activeds: ADsOpenObject should return E_FAIL by default.

parent 3eb581db
......@@ -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 (;;)
{
......
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment