ReactOS 0.4.17-dev-116-ga4b6fe9
pathname.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "iads.h"
#include "adserr.h"
#include "wine/debug.h"
#include "initguid.h"
Include dependency graph for pathname.c:

Go to the source code of this file.

Classes

struct  Pathname
 
struct  class_info
 
struct  class_factory
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (activeds)
 
 DEFINE_GUID (CLSID_Pathname, 0x080d0d78, 0xf421, 0x11d0, 0xa3, 0x6e, 0x00, 0xc0, 0x4f, 0xb9, 0x50, 0xdc)
 
static Pathnameimpl_from_IADsPathname (IADsPathname *iface)
 
static HRESULT WINAPI path_QueryInterface (IADsPathname *iface, REFIID riid, void **obj)
 
static ULONG WINAPI path_AddRef (IADsPathname *iface)
 
static ULONG WINAPI path_Release (IADsPathname *iface)
 
static HRESULT WINAPI path_GetTypeInfoCount (IADsPathname *iface, UINT *count)
 
static HRESULT WINAPI path_GetTypeInfo (IADsPathname *iface, UINT index, LCID lcid, ITypeInfo **info)
 
static HRESULT WINAPI path_GetIDsOfNames (IADsPathname *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
 
static HRESULT WINAPI path_Invoke (IADsPathname *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
 
static HRESULT parse_path (BSTR path, BSTR *provider, BSTR *server, BSTR *dn)
 
static HRESULT WINAPI path_Set (IADsPathname *iface, BSTR adspath, LONG type)
 
static HRESULT WINAPI path_SetDisplayType (IADsPathname *iface, LONG type)
 
static HRESULT WINAPI path_Retrieve (IADsPathname *iface, LONG type, BSTR *adspath)
 
static HRESULT WINAPI path_GetNumElements (IADsPathname *iface, LONG *count)
 
static HRESULT WINAPI path_GetElement (IADsPathname *iface, LONG index, BSTR *element)
 
static HRESULT WINAPI path_AddLeafElement (IADsPathname *iface, BSTR element)
 
static HRESULT WINAPI path_RemoveLeafElement (IADsPathname *iface)
 
static HRESULT WINAPI path_CopyPath (IADsPathname *iface, IDispatch **path)
 
static HRESULT WINAPI path_GetEscapedElement (IADsPathname *iface, LONG reserved, BSTR element, BSTR *str)
 
static HRESULT WINAPI path_get_EscapedMode (IADsPathname *iface, LONG *mode)
 
static HRESULT WINAPI path_put_EscapedMode (IADsPathname *iface, LONG mode)
 
static HRESULT Pathname_create (REFIID riid, void **obj)
 
static class_factoryimpl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI factory_QueryInterface (IClassFactory *iface, REFIID riid, LPVOID *obj)
 
static ULONG WINAPI factory_AddRef (IClassFactory *iface)
 
static ULONG WINAPI factory_Release (IClassFactory *iface)
 
static HRESULT WINAPI factory_CreateInstance (IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
 
static HRESULT WINAPI factory_LockServer (IClassFactory *iface, BOOL lock)
 
static HRESULT factory_constructor (const struct class_info *info, REFIID riid, void **obj)
 
HRESULT WINAPI DllGetClassObject (REFCLSID clsid, REFIID iid, LPVOID *obj)
 

Variables

static const IADsPathnameVtbl IADsPathname_vtbl
 
static const struct class_info class_info []
 
static const struct IClassFactoryVtbl factory_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file pathname.c.

Function Documentation

◆ DEFINE_GUID()

DEFINE_GUID ( CLSID_Pathname  ,
0x080d0d78  ,
0xf421  ,
0x11d0  ,
0xa3  ,
0x6e  ,
0x00  ,
0xc0  ,
0x4f  ,
0xb9  ,
0x50  ,
0xdc   
)

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  clsid,
REFIID  iid,
LPVOID obj 
)

Definition at line 543 of file pathname.c.

544{
545 int i;
546
547 TRACE("%s,%s,%p\n", debugstr_guid(clsid), debugstr_guid(iid), obj);
548
549 if (!clsid || !iid || !obj) return E_INVALIDARG;
550
551 *obj = NULL;
552
553 for (i = 0; i < ARRAY_SIZE(class_info); i++)
554 {
556 return factory_constructor(&class_info[i], iid, obj);
557 }
558
559 FIXME("class %s/%s is not implemented\n", debugstr_guid(clsid), debugstr_guid(iid));
561}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define debugstr_guid
Definition: kernel32.h:35
const CLSID * clsid
Definition: msctf.cpp:50
static HRESULT factory_constructor(const struct class_info *info, REFIID riid, void **obj)
Definition: pathname.c:525
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define TRACE(s)
Definition: solgame.cpp:4
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:3772

◆ factory_AddRef()

static ULONG WINAPI factory_AddRef ( IClassFactory iface)
static

Definition at line 473 of file pathname.c.

474{
477
478 TRACE("(%p) ref %lu\n", iface, ref);
479
480 return ref;
481}
#define InterlockedIncrement
Definition: armddk.h:53
static class_factory * impl_from_IClassFactory(IClassFactory *iface)
Definition: pathname.c:449
Definition: main.c:439
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ factory_constructor()

static HRESULT factory_constructor ( const struct class_info info,
REFIID  riid,
void **  obj 
)
static

Definition at line 525 of file pathname.c.

526{
528 HRESULT hr;
529
530 factory = malloc(sizeof(*factory));
531 if (!factory) return E_OUTOFMEMORY;
532
534 factory->ref = 1;
535 factory->info = info;
536
537 hr = IClassFactory_QueryInterface(&factory->IClassFactory_iface, riid, obj);
538 IClassFactory_Release(&factory->IClassFactory_iface);
539
540 return hr;
541}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:573
REFIID riid
Definition: atlbase.h:39
static const struct IClassFactoryVtbl factory_vtbl
Definition: pathname.c:516
IClassFactory IClassFactory_iface
Definition: main.c:440

Referenced by DllGetClassObject().

◆ factory_CreateInstance()

static HRESULT WINAPI factory_CreateInstance ( IClassFactory iface,
IUnknown outer,
REFIID  riid,
void **  obj 
)
static

Definition at line 496 of file pathname.c.

497{
499
500 TRACE("%p,%s,%p\n", outer, debugstr_guid(riid), obj);
501
502 if (!riid || !obj) return E_INVALIDARG;
503
504 *obj = NULL;
505 if (outer) return CLASS_E_NOAGGREGATION;
506
507 return factory->info->constructor(riid, obj);
508}
static IUnknown * outer
Definition: compobj.c:82
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:3771

◆ factory_LockServer()

static HRESULT WINAPI factory_LockServer ( IClassFactory iface,
BOOL  lock 
)
static

Definition at line 510 of file pathname.c.

511{
512 FIXME("%p,%d: stub\n", iface, lock);
513 return S_OK;
514}
#define S_OK
Definition: intsafe.h:52
rwlock_t lock
Definition: tcpcore.h:0

◆ factory_QueryInterface()

static HRESULT WINAPI factory_QueryInterface ( IClassFactory iface,
REFIID  riid,
LPVOID obj 
)
static

Definition at line 454 of file pathname.c.

455{
456 TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
457
458 if (!riid || !obj) return E_INVALIDARG;
459
462 {
463 IClassFactory_AddRef(iface);
464 *obj = iface;
465 return S_OK;
466 }
467
468 *obj = NULL;
469 FIXME("interface %s is not implemented\n", debugstr_guid(riid));
470 return E_NOINTERFACE;
471}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ factory_Release()

static ULONG WINAPI factory_Release ( IClassFactory iface)
static

Definition at line 483 of file pathname.c.

484{
487
488 TRACE("(%p) ref %lu\n", iface, ref);
489
490 if (!ref)
491 free(factory);
492
493 return ref;
494}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5

◆ impl_from_IADsPathname()

static Pathname * impl_from_IADsPathname ( IADsPathname *  iface)
inlinestatic

Definition at line 45 of file pathname.c.

46{
47 return CONTAINING_RECORD(iface, Pathname, IADsPathname_iface);
48}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by path_AddRef(), path_GetElement(), path_GetNumElements(), path_Release(), path_Retrieve(), and path_Set().

◆ impl_from_IClassFactory()

static class_factory * impl_from_IClassFactory ( IClassFactory iface)
inlinestatic

Definition at line 449 of file pathname.c.

450{
451 return CONTAINING_RECORD(iface, class_factory, IClassFactory_iface);
452}

Referenced by factory_AddRef(), factory_CreateInstance(), and factory_Release().

◆ parse_path()

static HRESULT parse_path ( BSTR  path,
BSTR provider,
BSTR server,
BSTR dn 
)
static

Definition at line 119 of file pathname.c.

120{
121 WCHAR *p, *p_server;
122 int server_len;
123
124 *provider = NULL;
125 *server = NULL;
126 *dn = NULL;
127
128 if (wcsnicmp(path, L"LDAP:", 5) != 0)
129 return E_ADS_BAD_PATHNAME;
130
131 *provider = SysAllocStringLen(path, 4);
132 if (!*provider) return E_OUTOFMEMORY;
133
134 p = path + 5;
135 if (!*p) return S_OK;
136
137 if (*p++ != '/' || *p++ != '/' || !*p)
138 {
139 SysFreeString(*provider);
140 return E_ADS_BAD_PATHNAME;
141 }
142
143 p_server = p;
144 server_len = 0;
145 while (*p && *p != '/')
146 {
147 p++;
148 server_len++;
149 }
150 if (server_len == 0)
151 {
152 SysFreeString(*provider);
153 return E_ADS_BAD_PATHNAME;
154 }
155
156 *server = SysAllocStringLen(p_server, server_len);
157 if (!*server)
158 {
159 SysFreeString(*provider);
160 return E_OUTOFMEMORY;
161 }
162
163 if (!*p) return S_OK;
164
165 if (*p++ != '/' || !*p)
166 {
167 SysFreeString(*provider);
169 return E_ADS_BAD_PATHNAME;
170 }
171
172 *dn = SysAllocString(p);
173 if (!*dn)
174 {
175 SysFreeString(*provider);
177 return E_OUTOFMEMORY;
178 }
179
180 return S_OK;
181}
#define E_ADS_BAD_PATHNAME
Definition: adserr.h:28
#define wcsnicmp
Definition: compat.h:14
#define L(x)
Definition: resources.c:13
GLfloat GLfloat p
Definition: glext.h:8902
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
short WCHAR
Definition: pedump.c:58
static rfbScreenInfoPtr server
Definition: vnc.c:74

Referenced by exec_assoc_view(), get_antecedent_table(), and path_Set().

◆ path_AddLeafElement()

static HRESULT WINAPI path_AddLeafElement ( IADsPathname *  iface,
BSTR  element 
)
static

Definition at line 355 of file pathname.c.

356{
357 FIXME("%p,%s: stub\n", iface, debugstr_w(element));
358 return E_NOTIMPL;
359}
#define E_NOTIMPL
Definition: ddrawi.h:99
#define debugstr_w
Definition: kernel32.h:32

◆ path_AddRef()

static ULONG WINAPI path_AddRef ( IADsPathname *  iface)
static

Definition at line 69 of file pathname.c.

70{
72 return InterlockedIncrement(&path->ref);
73}
static Pathname * impl_from_IADsPathname(IADsPathname *iface)
Definition: pathname.c:45

◆ path_CopyPath()

static HRESULT WINAPI path_CopyPath ( IADsPathname *  iface,
IDispatch **  path 
)
static

Definition at line 367 of file pathname.c.

368{
369 FIXME("%p,%p: stub\n", iface, path);
370 return E_NOTIMPL;
371}

◆ path_get_EscapedMode()

static HRESULT WINAPI path_get_EscapedMode ( IADsPathname *  iface,
LONG mode 
)
static

Definition at line 379 of file pathname.c.

380{
381 FIXME("%p,%p: stub\n", iface, mode);
382 return E_NOTIMPL;
383}
GLenum mode
Definition: glext.h:6217

◆ path_GetElement()

static HRESULT WINAPI path_GetElement ( IADsPathname *  iface,
LONG  index,
BSTR element 
)
static

Definition at line 322 of file pathname.c.

323{
325 HRESULT hr;
326 WCHAR *p, *end;
327 LONG count;
328
329 TRACE("%p,%ld,%p\n", iface, index, element);
330
331 if (!element) return E_INVALIDARG;
332
333 count = 0;
335
336 p = path->dn;
337 while (p)
338 {
339 end = wcschr(p, ',');
340
341 if (index == count)
342 {
345 break;
346 }
347
348 p = end ? end + 1 : NULL;
349 count++;
350 }
351
352 return hr;
353}
#define wcschr
Definition: compat.h:17
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLuint index
Definition: glext.h:6031
long LONG
Definition: pedump.c:60
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define ERROR_INVALID_INDEX
Definition: winerror.h:1239

◆ path_GetEscapedElement()

static HRESULT WINAPI path_GetEscapedElement ( IADsPathname *  iface,
LONG  reserved,
BSTR  element,
BSTR str 
)
static

Definition at line 373 of file pathname.c.

374{
375 FIXME("%p,%ld,%s,%p: stub\n", iface, reserved, debugstr_w(element), str);
376 return E_NOTIMPL;
377}
r reserved
Definition: btrfs.c:3006
const WCHAR * str

◆ path_GetIDsOfNames()

static HRESULT WINAPI path_GetIDsOfNames ( IADsPathname *  iface,
REFIID  riid,
LPOLESTR names,
UINT  count,
LCID  lcid,
DISPID dispid 
)
static

Definition at line 104 of file pathname.c.

106{
107 FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
108 return E_NOTIMPL;
109}
LCID lcid
Definition: locale.c:5656
GLuint GLuint * names
Definition: glext.h:11545

◆ path_GetNumElements()

static HRESULT WINAPI path_GetNumElements ( IADsPathname *  iface,
LONG count 
)
static

Definition at line 300 of file pathname.c.

301{
303 WCHAR *p;
304
305 TRACE("%p,%p\n", iface, count);
306
307 if (!count) return E_INVALIDARG;
308
309 *count = 0;
310
311 p = path->dn;
312 while (p)
313 {
314 *count += 1;
315 p = wcschr(p, ',');
316 if (p) p++;
317 }
318
319 return S_OK;
320}

◆ path_GetTypeInfo()

static HRESULT WINAPI path_GetTypeInfo ( IADsPathname *  iface,
UINT  index,
LCID  lcid,
ITypeInfo **  info 
)
static

Definition at line 98 of file pathname.c.

99{
100 FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info);
101 return E_NOTIMPL;
102}

◆ path_GetTypeInfoCount()

static HRESULT WINAPI path_GetTypeInfoCount ( IADsPathname *  iface,
UINT count 
)
static

Definition at line 92 of file pathname.c.

93{
94 FIXME("%p,%p: stub\n", iface, count);
95 return E_NOTIMPL;
96}

◆ path_Invoke()

static HRESULT WINAPI path_Invoke ( IADsPathname *  iface,
DISPID  dispid,
REFIID  riid,
LCID  lcid,
WORD  flags,
DISPPARAMS *  params,
VARIANT result,
EXCEPINFO *  excepinfo,
UINT argerr 
)
static

Definition at line 111 of file pathname.c.

113{
114 FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
115 params, result, excepinfo, argerr);
116 return E_NOTIMPL;
117}
GLenum const GLfloat * params
Definition: glext.h:5645
GLbitfield flags
Definition: glext.h:7161
GLuint64EXT * result
Definition: glext.h:11304
static EXCEPINFO excepinfo
Definition: automation.c:47

◆ path_put_EscapedMode()

static HRESULT WINAPI path_put_EscapedMode ( IADsPathname *  iface,
LONG  mode 
)
static

Definition at line 385 of file pathname.c.

386{
387 FIXME("%p,%ld: stub\n", iface, mode);
388 return E_NOTIMPL;
389}

◆ path_QueryInterface()

static HRESULT WINAPI path_QueryInterface ( IADsPathname *  iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 50 of file pathname.c.

51{
52 TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
53
54 if (!riid || !obj) return E_INVALIDARG;
55
58 IsEqualGUID(riid, &IID_IADsPathname))
59 {
60 IADsPathname_AddRef(iface);
61 *obj = iface;
62 return S_OK;
63 }
64
65 FIXME("interface %s is not implemented\n", debugstr_guid(riid));
66 return E_NOINTERFACE;
67}
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ path_Release()

static ULONG WINAPI path_Release ( IADsPathname *  iface)
static

Definition at line 75 of file pathname.c.

76{
79
80 if (!ref)
81 {
82 TRACE("destroying %p\n", iface);
83 SysFreeString(path->provider);
86 free(path);
87 }
88
89 return ref;
90}
WCHAR * server
Definition: path.c:56

◆ path_RemoveLeafElement()

static HRESULT WINAPI path_RemoveLeafElement ( IADsPathname *  iface)
static

Definition at line 361 of file pathname.c.

362{
363 FIXME("%p: stub\n", iface);
364 return E_NOTIMPL;
365}

◆ path_Retrieve()

static HRESULT WINAPI path_Retrieve ( IADsPathname *  iface,
LONG  type,
BSTR adspath 
)
static

Definition at line 240 of file pathname.c.

241{
243 int len;
244
245 TRACE("%p,%ld,%p\n", iface, type, adspath);
246
247 if (!adspath) return E_INVALIDARG;
248
249 switch (type)
250 {
251 default:
252 FIXME("type %ld not implemented\n", type);
253 /* fall through */
254
255 case ADS_FORMAT_X500:
256 len = wcslen(path->provider) + 3;
257 if (path->server) len += wcslen(path->server) + 1;
258 if (path->dn) len += wcslen(path->dn);
259
260 *adspath = SysAllocStringLen(NULL, len);
261 if (!*adspath) break;
262
263 wcscpy(*adspath, path->provider);
264 wcscat(*adspath, L"://");
265 if (path->server)
266 {
267 wcscat(*adspath, path->server);
268 wcscat(*adspath, L"/");
269 }
270 if (path->dn) wcscat(*adspath, path->dn);
271 break;
272
274 *adspath = SysAllocString(path->provider);
275 break;
276
278 *adspath = path->provider ? SysAllocString(path->server) : SysAllocStringLen(NULL, 0);
279 break;
280
282 *adspath = path->dn ? SysAllocString(path->dn) : SysAllocStringLen(NULL, 0);
283 break;
284
285 case ADS_FORMAT_LEAF:
286 if (!path->dn)
287 *adspath = SysAllocStringLen(NULL, 0);
288 else
289 {
290 WCHAR *p = wcschr(path->dn, ',');
291 *adspath = p ? SysAllocStringLen(path->dn, p - path->dn) : SysAllocString(path->dn);
292 }
293 break;
294 }
295
296 TRACE("=> %s\n", debugstr_w(*adspath));
297 return *adspath ? S_OK : E_OUTOFMEMORY;
298}
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum GLsizei len
Definition: glext.h:6722
@ ADS_FORMAT_PROVIDER
Definition: iads.idl:392
@ ADS_FORMAT_X500_DN
Definition: iads.idl:389
@ ADS_FORMAT_SERVER
Definition: iads.idl:391
@ ADS_FORMAT_X500
Definition: iads.idl:387
@ ADS_FORMAT_LEAF
Definition: iads.idl:393
wcscat
wcscpy

◆ path_Set()

static HRESULT WINAPI path_Set ( IADsPathname *  iface,
BSTR  adspath,
LONG  type 
)
static

Definition at line 183 of file pathname.c.

184{
186 HRESULT hr;
187 BSTR provider, server, dn;
188
189 TRACE("%p,%s,%ld\n", iface, debugstr_w(adspath), type);
190
191 if (!adspath) return E_INVALIDARG;
192
193 if (type == ADS_SETTYPE_PROVIDER)
194 {
195 SysFreeString(path->provider);
196 path->provider = SysAllocString(adspath);
197 return path->provider ? S_OK : E_OUTOFMEMORY;
198 }
199
200 if (type == ADS_SETTYPE_SERVER)
201 {
203 path->server = SysAllocString(adspath);
204 return path->server ? S_OK : E_OUTOFMEMORY;
205 }
206
207 if (type == ADS_SETTYPE_DN)
208 {
209 SysFreeString(path->dn);
210 path->dn = SysAllocString(adspath);
211 return path->dn ? S_OK : E_OUTOFMEMORY;
212 }
213
214 if (type != ADS_SETTYPE_FULL)
215 {
216 FIXME("type %ld not implemented\n", type);
217 return E_INVALIDARG;
218 }
219
220 hr = parse_path(adspath, &provider, &server, &dn);
221 if (hr == S_OK)
222 {
223 SysFreeString(path->provider);
225 SysFreeString(path->dn);
226
227 path->provider = provider;
228 path->server = server;
229 path->dn = dn;
230 }
231 return hr;
232}
OLECHAR * BSTR
Definition: compat.h:2293
static HRESULT parse_path(BSTR path, BSTR *provider, BSTR *server, BSTR *dn)
Definition: pathname.c:119

◆ path_SetDisplayType()

static HRESULT WINAPI path_SetDisplayType ( IADsPathname *  iface,
LONG  type 
)
static

Definition at line 234 of file pathname.c.

235{
236 FIXME("%p,%ld: stub\n", iface, type);
237 return E_NOTIMPL;
238}

◆ Pathname_create()

static HRESULT Pathname_create ( REFIID  riid,
void **  obj 
)
static

Definition at line 413 of file pathname.c.

414{
415 Pathname *path;
416 HRESULT hr;
417
418 path = malloc(sizeof(*path));
419 if (!path) return E_OUTOFMEMORY;
420
421 path->IADsPathname_iface.lpVtbl = &IADsPathname_vtbl;
422 path->ref = 1;
423 path->provider = SysAllocString(L"LDAP");
424 path->server = NULL;
425 path->dn = NULL;
426
427 hr = IADsPathname_QueryInterface(&path->IADsPathname_iface, riid, obj);
428 IADsPathname_Release(&path->IADsPathname_iface);
429
430 return hr;
431}
static const IADsPathnameVtbl IADsPathname_vtbl
Definition: pathname.c:391

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( activeds  )

Variable Documentation

◆ class_info

Initial value:
=
{
{ &CLSID_Pathname, Pathname_create }
}
static HRESULT Pathname_create(REFIID riid, void **obj)
Definition: pathname.c:413

◆ factory_vtbl

const struct IClassFactoryVtbl factory_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI factory_Release(IClassFactory *iface)
Definition: pathname.c:483
static ULONG WINAPI factory_AddRef(IClassFactory *iface)
Definition: pathname.c:473
static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
Definition: pathname.c:496
static HRESULT WINAPI factory_LockServer(IClassFactory *iface, BOOL lock)
Definition: pathname.c:510
static HRESULT WINAPI factory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *obj)
Definition: pathname.c:454

Definition at line 516 of file pathname.c.

Referenced by factory_constructor().

◆ IADsPathname_vtbl

const IADsPathnameVtbl IADsPathname_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI path_GetTypeInfo(IADsPathname *iface, UINT index, LCID lcid, ITypeInfo **info)
Definition: pathname.c:98
static HRESULT WINAPI path_Retrieve(IADsPathname *iface, LONG type, BSTR *adspath)
Definition: pathname.c:240
static HRESULT WINAPI path_SetDisplayType(IADsPathname *iface, LONG type)
Definition: pathname.c:234
static HRESULT WINAPI path_GetEscapedElement(IADsPathname *iface, LONG reserved, BSTR element, BSTR *str)
Definition: pathname.c:373
static HRESULT WINAPI path_GetNumElements(IADsPathname *iface, LONG *count)
Definition: pathname.c:300
static HRESULT WINAPI path_CopyPath(IADsPathname *iface, IDispatch **path)
Definition: pathname.c:367
static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR adspath, LONG type)
Definition: pathname.c:183
static ULONG WINAPI path_AddRef(IADsPathname *iface)
Definition: pathname.c:69
static ULONG WINAPI path_Release(IADsPathname *iface)
Definition: pathname.c:75
static HRESULT WINAPI path_Invoke(IADsPathname *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
Definition: pathname.c:111
static HRESULT WINAPI path_GetElement(IADsPathname *iface, LONG index, BSTR *element)
Definition: pathname.c:322
static HRESULT WINAPI path_GetIDsOfNames(IADsPathname *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid)
Definition: pathname.c:104
static HRESULT WINAPI path_GetTypeInfoCount(IADsPathname *iface, UINT *count)
Definition: pathname.c:92
static HRESULT WINAPI path_AddLeafElement(IADsPathname *iface, BSTR element)
Definition: pathname.c:355
static HRESULT WINAPI path_QueryInterface(IADsPathname *iface, REFIID riid, void **obj)
Definition: pathname.c:50
static HRESULT WINAPI path_RemoveLeafElement(IADsPathname *iface)
Definition: pathname.c:361
static HRESULT WINAPI path_put_EscapedMode(IADsPathname *iface, LONG mode)
Definition: pathname.c:385
static HRESULT WINAPI path_get_EscapedMode(IADsPathname *iface, LONG *mode)
Definition: pathname.c:379

Definition at line 391 of file pathname.c.

Referenced by Pathname_create().