From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/activeds/activeds.idl | 10 +++++++--- dlls/activeds/pathname.c | 23 ++++++++++------------- dlls/activeds/tests/activeds.c | 2 -- include/iads.idl | 11 +++++++++++ 4 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/dlls/activeds/activeds.idl b/dlls/activeds/activeds.idl index 561c47ce0ea..69f85b87172 100644 --- a/dlls/activeds/activeds.idl +++ b/dlls/activeds/activeds.idl @@ -19,9 +19,13 @@ #pragma makedep register
[ + threading(both), helpstring("ADs LDAP Pathname Descriptor Object"), - progid("Pathname"), uuid(080d0d78-f421-11d0-a36e-00c04fb950dc), - threading(both) + progid("Pathname"), + version(1.0) ] -coclass Pathname { interface IADsPathname; } +coclass Pathname +{ + interface IADsPathname; +} diff --git a/dlls/activeds/pathname.c b/dlls/activeds/pathname.c index 8142e47e244..556b0674471 100644 --- a/dlls/activeds/pathname.c +++ b/dlls/activeds/pathname.c @@ -32,19 +32,16 @@
WINE_DEFAULT_DEBUG_CHANNEL(activeds);
-#include "initguid.h" -DEFINE_GUID(CLSID_Pathname,0x080d0d78,0xf421,0x11d0,0xa3,0x6e,0x00,0xc0,0x4f,0xb9,0x50,0xdc); - typedef struct { IADsPathname IADsPathname_iface; LONG ref; BSTR provider, server, dn; -} Pathname; +} ADsPathname;
-static inline Pathname *impl_from_IADsPathname(IADsPathname *iface) +static inline ADsPathname *impl_from_IADsPathname(IADsPathname *iface) { - return CONTAINING_RECORD(iface, Pathname, IADsPathname_iface); + return CONTAINING_RECORD(iface, ADsPathname, IADsPathname_iface); }
static HRESULT WINAPI path_QueryInterface(IADsPathname *iface, REFIID riid, void **obj) @@ -68,13 +65,13 @@ static HRESULT WINAPI path_QueryInterface(IADsPathname *iface, REFIID riid, void
static ULONG WINAPI path_AddRef(IADsPathname *iface) { - Pathname *path = impl_from_IADsPathname(iface); + ADsPathname *path = impl_from_IADsPathname(iface); return InterlockedIncrement(&path->ref); }
static ULONG WINAPI path_Release(IADsPathname *iface) { - Pathname *path = impl_from_IADsPathname(iface); + ADsPathname *path = impl_from_IADsPathname(iface); LONG ref = InterlockedDecrement(&path->ref);
if (!ref) @@ -182,7 +179,7 @@ static HRESULT parse_path(BSTR path, BSTR *provider, BSTR *server, BSTR *dn)
static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR adspath, LONG type) { - Pathname *path = impl_from_IADsPathname(iface); + ADsPathname *path = impl_from_IADsPathname(iface); HRESULT hr; BSTR provider, server, dn;
@@ -239,7 +236,7 @@ static HRESULT WINAPI path_SetDisplayType(IADsPathname *iface, LONG type)
static HRESULT WINAPI path_Retrieve(IADsPathname *iface, LONG type, BSTR *adspath) { - Pathname *path = impl_from_IADsPathname(iface); + ADsPathname *path = impl_from_IADsPathname(iface); int len;
TRACE("%p,%ld,%p\n", iface, type, adspath); @@ -299,7 +296,7 @@ static HRESULT WINAPI path_Retrieve(IADsPathname *iface, LONG type, BSTR *adspat
static HRESULT WINAPI path_GetNumElements(IADsPathname *iface, LONG *count) { - Pathname *path = impl_from_IADsPathname(iface); + ADsPathname *path = impl_from_IADsPathname(iface); WCHAR *p;
TRACE("%p,%p\n", iface, count); @@ -321,7 +318,7 @@ static HRESULT WINAPI path_GetNumElements(IADsPathname *iface, LONG *count)
static HRESULT WINAPI path_GetElement(IADsPathname *iface, LONG index, BSTR *element) { - Pathname *path = impl_from_IADsPathname(iface); + ADsPathname *path = impl_from_IADsPathname(iface); HRESULT hr; WCHAR *p, *end; LONG count; @@ -412,7 +409,7 @@ static const IADsPathnameVtbl IADsPathname_vtbl =
static HRESULT Pathname_create(REFIID riid, void **obj) { - Pathname *path; + ADsPathname *path; HRESULT hr;
path = malloc(sizeof(*path)); diff --git a/dlls/activeds/tests/activeds.c b/dlls/activeds/tests/activeds.c index 024a2153c65..4f2c399b0cf 100644 --- a/dlls/activeds/tests/activeds.c +++ b/dlls/activeds/tests/activeds.c @@ -31,8 +31,6 @@
#include "wine/test.h"
-DEFINE_GUID(CLSID_Pathname,0x080d0d78,0xf421,0x11d0,0xa3,0x6e,0x00,0xc0,0x4f,0xb9,0x50,0xdc); - static void test_ADsBuildVarArrayStr(void) { const WCHAR *props[] = { L"prop1", L"prop2" }; diff --git a/include/iads.idl b/include/iads.idl index 6dfafce3a87..8be96a729b3 100644 --- a/include/iads.idl +++ b/include/iads.idl @@ -903,6 +903,17 @@ interface IADsPathname : IDispatch HRESULT put_EscapedMode(long mode); }
+[ + helpstring("ADs LDAP Pathname Descriptor Object"), + uuid(080d0d78-f421-11d0-a36e-00c04fb950dc), + progid("Pathname"), + version(1.0) +] +coclass Pathname +{ + interface IADsPathname; +} + /***************************************************************************** * IADsADSystemInfo interface */