From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/activeds/activeds.idl | 24 ++++++++++++++++++++++++ dlls/adsldp/adsldp.idl | 14 ++------------ include/iads.idl | 4 ++++ 3 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/dlls/activeds/activeds.idl b/dlls/activeds/activeds.idl index 69f85b87172..ce8b6495d8e 100644 --- a/dlls/activeds/activeds.idl +++ b/dlls/activeds/activeds.idl @@ -29,3 +29,27 @@ coclass Pathname { interface IADsPathname; } + +[ + threading(both), + helpstring("ADs DN With String Object"), + uuid(334857cc-f934-11d2-ba96-00c04fb6d0d1), + progid("DNWithString"), + version(1.0) +] +coclass DNWithString +{ + interface IADsDNWithString; +} + +[ + threading(both), + helpstring("ADs DN With Binary Object"), + uuid(7e99c0a3-f935-11d2-ba96-00c04fb6d0d1), + progid("DNWithBinary"), + version(1.0) +] +coclass DNWithBinary +{ + interface IADsDNWithBinary; +} diff --git a/dlls/adsldp/adsldp.idl b/dlls/adsldp/adsldp.idl index 2130ef75106..da68ba59d48 100644 --- a/dlls/adsldp/adsldp.idl +++ b/dlls/adsldp/adsldp.idl @@ -20,6 +20,8 @@
#pragma makedep register
+#include "iads.idl" + [ threading(both), helpstring("LDAP Provider Object"), @@ -41,15 +43,3 @@ coclass ADs { interface IADs; } - -[ - threading(both), - helpstring("AD System Info Object"), - uuid(50b6327f-afd1-11d2-9cb9-0000f87a369e), - progid("ADSystemInfo"), - version(1.0) -] -coclass ADSystemInfo -{ - interface IADsADSystemInfo; -} diff --git a/include/iads.idl b/include/iads.idl index c7bba43111e..5a81d527384 100644 --- a/include/iads.idl +++ b/include/iads.idl @@ -904,6 +904,7 @@ interface IADsPathname : IDispatch }
[ + threading(both), helpstring("ADs LDAP Pathname Descriptor Object"), uuid(080d0d78-f421-11d0-a36e-00c04fb950dc), progid("Pathname"), @@ -954,6 +955,7 @@ interface IADsADSystemInfo : IDispatch }
[ + threading(both), helpstring("AD System Info Object"), uuid(50b6327f-afd1-11d2-9cb9-0000f87a369e), progid("ADSystemInfo"), @@ -986,6 +988,7 @@ interface IADsDNWithBinary : IDispatch }
[ + threading(both), helpstring("ADs DN With Binary Object"), uuid(7e99c0a3-f935-11d2-ba96-00c04fb6d0d1), progid("DNWithBinary"), @@ -1018,6 +1021,7 @@ interface IADsDNWithString : IDispatch }
[ + threading(both), helpstring("ADs DN With String Object"), uuid(334857cc-f934-11d2-ba96-00c04fb6d0d1), progid("DNWithString"),
From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/adsldp/adsldp.c | 98 ++++++++++++++++++++++++++++++++++++++++++++ include/iads.idl | 17 ++++++++ 2 files changed, 115 insertions(+)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 5c59cef05e5..aca677d7b55 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -379,6 +379,7 @@ typedef struct IADsOpenDSObject IADsOpenDSObject_iface; IDirectorySearch IDirectorySearch_iface; IDirectoryObject IDirectoryObject_iface; + IADsObjectOptions IADsObjectOptions_iface; LONG ref; LDAP *ld; BSTR host; @@ -455,6 +456,13 @@ static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj return S_OK; }
+ if (IsEqualGUID(riid, &IID_IADsObjectOptions)) + { + IADs_AddRef(iface); + *obj = &ldap->IADsObjectOptions_iface; + return S_OK; + } + FIXME("interface %s is not implemented\n", debugstr_guid(riid)); return E_NOINTERFACE; } @@ -2176,6 +2184,95 @@ static const IDirectoryObjectVtbl IDirectoryObject_vtbl = dirobj_DeleteDSObject };
+static inline LDAP_namespace *impl_from_IADsObjectOptions(IADsObjectOptions *iface) +{ + return CONTAINING_RECORD(iface, LDAP_namespace, IADsObjectOptions_iface); +} + +static HRESULT WINAPI options_QueryInterface(IADsObjectOptions *iface, REFIID riid, void **obj) +{ + LDAP_namespace *ldap = impl_from_IADsObjectOptions(iface); + + TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj); + + if (!riid || !obj) return E_INVALIDARG; + + if (IsEqualGUID(riid, &IID_IADsObjectOptions) || + IsEqualGUID(riid, &IID_IDispatch) || + IsEqualGUID(riid, &IID_IUnknown)) + { + IADsObjectOptions_AddRef(iface); + *obj = iface; + return S_OK; + } + + return IADs_QueryInterface(&ldap->IADs_iface, riid, obj); +} + +static ULONG WINAPI options_AddRef(IADsObjectOptions *iface) +{ + LDAP_namespace *ldap = impl_from_IADsObjectOptions(iface); + return IADs_AddRef(&ldap->IADs_iface); +} + +static ULONG WINAPI options_Release(IADsObjectOptions *iface) +{ + LDAP_namespace *ldap = impl_from_IADsObjectOptions(iface); + return IADs_Release(&ldap->IADs_iface); +} + +static HRESULT WINAPI options_GetTypeInfoCount(IADsObjectOptions *iface, UINT *count) +{ + FIXME("%p,%p: stub\n", iface, count); + return E_NOTIMPL; +} + +static HRESULT WINAPI options_GetTypeInfo(IADsObjectOptions *iface, UINT index, LCID lcid, ITypeInfo **info) +{ + FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info); + return E_NOTIMPL; +} + +static HRESULT WINAPI options_GetIDsOfNames(IADsObjectOptions *iface, REFIID riid, LPOLESTR *names, + UINT count, LCID lcid, DISPID *dispid) +{ + FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid); + return E_NOTIMPL; +} + +static HRESULT WINAPI options_Invoke(IADsObjectOptions *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags, + DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr) +{ + FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags, + params, result, excepinfo, argerr); + return E_NOTIMPL; +} + +static HRESULT WINAPI options_GetOption(IADsObjectOptions *iface, LONG option, VARIANT *var) +{ + FIXME("%p,%ld,%p: stub\n", iface, option, var); + return E_NOTIMPL; +} + +static HRESULT WINAPI options_SetOption(IADsObjectOptions *iface, LONG option, VARIANT var) +{ + FIXME("%p,%ld,%s: stub\n", iface, option, wine_dbgstr_variant(&var)); + return E_NOTIMPL; +} + +static const IADsObjectOptionsVtbl IADsObjectOptions_vtbl = +{ + options_QueryInterface, + options_AddRef, + options_Release, + options_GetTypeInfoCount, + options_GetTypeInfo, + options_GetIDsOfNames, + options_Invoke, + options_GetOption, + options_SetOption +}; + static HRESULT LDAPNamespace_create(REFIID riid, void **obj) { LDAP_namespace *ldap; @@ -2188,6 +2285,7 @@ static HRESULT LDAPNamespace_create(REFIID riid, void **obj) ldap->IADsOpenDSObject_iface.lpVtbl = &IADsOpenDSObject_vtbl; ldap->IDirectorySearch_iface.lpVtbl = &IDirectorySearch_vtbl; ldap->IDirectoryObject_iface.lpVtbl = &IDirectoryObject_vtbl; + ldap->IADsObjectOptions_iface.lpVtbl = &IADsObjectOptions_vtbl; ldap->ref = 1; ldap->ld = NULL; ldap->host = NULL; diff --git a/include/iads.idl b/include/iads.idl index 5a81d527384..052aea37776 100644 --- a/include/iads.idl +++ b/include/iads.idl @@ -486,6 +486,23 @@ interface IADs : IDispatch HRESULT GetInfoEx( [in] VARIANT vProperties, [in] long lnReserved); }
+/***************************************************************************** + * IADsObjectOptions interface + */ +[ + odl, + uuid(46F14FDA-232B-11D1-A808-00C04FD8D5A8), + dual, + oleautomation +] +interface IADsObjectOptions : IDispatch +{ + [id(0x00000002)] + HRESULT GetOption([in] long option, [out, retval] VARIANT *var); + [id(0x00000003)] + HRESULT SetOption([in] long option, [in] VARIANT var); +} + /***************************************************************************** * IADsMembers interface */
From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/adsldp/adsldp.c | 38 ++++++++++++++++++++++++++++++++++++-- include/iads.idl | 14 ++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index aca677d7b55..79dcca082fe 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -458,6 +458,9 @@ static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj
if (IsEqualGUID(riid, &IID_IADsObjectOptions)) { + if (!ldap->ld || (ldap->object && wcsicmp(ldap->object, L"rootDSE") != 0)) + return E_NOINTERFACE; + IADs_AddRef(iface); *obj = &ldap->IADsObjectOptions_iface; return S_OK; @@ -2250,8 +2253,39 @@ static HRESULT WINAPI options_Invoke(IADsObjectOptions *iface, DISPID dispid, RE
static HRESULT WINAPI options_GetOption(IADsObjectOptions *iface, LONG option, VARIANT *var) { - FIXME("%p,%ld,%p: stub\n", iface, option, var); - return E_NOTIMPL; + LDAP_namespace *ldap = impl_from_IADsObjectOptions(iface); + LONG err; + + TRACE("%p,%ld,%p\n", iface, option, var); + + if (!ldap->ld) return E_NOTIMPL; + + switch (option) + { + case ADS_OPTION_SERVERNAME: + { + WCHAR *host; + BSTR val; + + err = ldap_get_optionW(ldap->ld, LDAP_OPT_HOST_NAME, &host); + if (err != LDAP_SUCCESS) + return HRESULT_FROM_WIN32(map_ldap_error(err)); + + val = SysAllocString(host); + ldap_memfreeW(host); + if (!val) return E_OUTOFMEMORY; + + V_VT(var) = VT_BSTR; + V_BSTR(var) = val; + return S_OK; + } + + default: + FIXME("%p,%ld,%p: stub\n", iface, option, var); + break; + } + + return E_ADS_BAD_PARAMETER; }
static HRESULT WINAPI options_SetOption(IADsObjectOptions *iface, LONG option, VARIANT var) diff --git a/include/iads.idl b/include/iads.idl index 052aea37776..2e560007014 100644 --- a/include/iads.idl +++ b/include/iads.idl @@ -152,6 +152,20 @@ typedef enum ADS_PASSWORD_ENCODE_CLEAR } ADS_PASSWORD_ENCODING_ENUM;
+typedef enum +{ + ADS_OPTION_SERVERNAME, + ADS_OPTION_REFERRALS, + ADS_OPTION_PAGE_SIZE, + ADS_OPTION_SECURITY_MASK, + ADS_OPTION_MUTUAL_AUTH_STATUS, + ADS_OPTION_QUOTA, + ADS_OPTION_PASSWORD_PORTNUMBER, + ADS_OPTION_PASSWORD_METHOD, + ADS_OPTION_ACCUMULATIVE_MODIFICATION, + ADS_OPTION_SKIP_SID_LOOKUP +} ADS_OPTION_ENUM; + typedef struct _ADS_CASEIGNORE_LIST { struct _ADS_CASEIGNORE_LIST *Next;
From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/adsldp/adsldp.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 79dcca082fe..f0e9f8c0b3c 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -2280,6 +2280,11 @@ static HRESULT WINAPI options_GetOption(IADsObjectOptions *iface, LONG option, V return S_OK; }
+ case ADS_OPTION_ACCUMULATIVE_MODIFICATION: + V_VT(var) = VT_BOOL; + V_BOOL(var) = VARIANT_FALSE; + return S_OK; + default: FIXME("%p,%ld,%p: stub\n", iface, option, var); break;
From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/adsldp/adsldp.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index f0e9f8c0b3c..675ca83d03f 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -2296,6 +2296,16 @@ static HRESULT WINAPI options_GetOption(IADsObjectOptions *iface, LONG option, V static HRESULT WINAPI options_SetOption(IADsObjectOptions *iface, LONG option, VARIANT var) { FIXME("%p,%ld,%s: stub\n", iface, option, wine_dbgstr_variant(&var)); + + switch (option) + { + case ADS_OPTION_ACCUMULATIVE_MODIFICATION: + return S_OK; + + default: + break; + } + return E_NOTIMPL; }
Test failures activeds.c:141:0.015 Test failed: got 0x800401f8 sysinfo.c:73:0.017 Test failed: got 0x80040154 are related, I'll have a look.