server: Move socket async activation to sock_poll_event.
[wine] / dlls / urlmon / uri.c
1 /*
2  * Copyright 2010 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #include "urlmon_main.h"
20 #include "wine/debug.h"
21
22 WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
23
24 typedef struct {
25     const IUriVtbl  *lpIUriVtbl;
26     LONG ref;
27 } Uri;
28
29 typedef struct {
30     const IUriBuilderVtbl  *lpIUriBuilderVtbl;
31     LONG ref;
32 } UriBuilder;
33
34 #define URI(x)         ((IUri*)  &(x)->lpIUriVtbl)
35 #define URIBUILDER(x)  ((IUriBuilder*)  &(x)->lpIUriBuilderVtbl)
36
37 #define URI_THIS(iface) DEFINE_THIS(Uri, IUri, iface)
38
39 static HRESULT WINAPI Uri_QueryInterface(IUri *iface, REFIID riid, void **ppv)
40 {
41     Uri *This = URI_THIS(iface);
42
43     if(IsEqualGUID(&IID_IUnknown, riid)) {
44         TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
45         *ppv = URI(This);
46     }else if(IsEqualGUID(&IID_IUri, riid)) {
47         TRACE("(%p)->(IID_IUri %p)\n", This, ppv);
48         *ppv = URI(This);
49     }else {
50         TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
51         *ppv = NULL;
52         return E_NOINTERFACE;
53     }
54
55     IUnknown_AddRef((IUnknown*)*ppv);
56     return S_OK;
57 }
58
59 static ULONG WINAPI Uri_AddRef(IUri *iface)
60 {
61     Uri *This = URI_THIS(iface);
62     LONG ref = InterlockedIncrement(&This->ref);
63
64     TRACE("(%p) ref=%d\n", This, ref);
65
66     return ref;
67 }
68
69 static ULONG WINAPI Uri_Release(IUri *iface)
70 {
71     Uri *This = URI_THIS(iface);
72     LONG ref = InterlockedDecrement(&This->ref);
73
74     TRACE("(%p) ref=%d\n", This, ref);
75
76     if(!ref)
77         heap_free(This);
78
79     return ref;
80 }
81
82 static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BSTR *pbstrProperty, DWORD dwFlags)
83 {
84     Uri *This = URI_THIS(iface);
85     FIXME("(%p)->(%d %p %x)\n", This, uriProp, pbstrProperty, dwFlags);
86     return E_NOTIMPL;
87 }
88
89 static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
90 {
91     Uri *This = URI_THIS(iface);
92     FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
93     return E_NOTIMPL;
94 }
95
96 static HRESULT WINAPI Uri_GetPropertyDWORD(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
97 {
98     Uri *This = URI_THIS(iface);
99     FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
100     return E_NOTIMPL;
101 }
102
103 static HRESULT WINAPI Uri_HasProperty(IUri *iface, Uri_PROPERTY uriProp, BOOL *pfHasProperty)
104 {
105     Uri *This = URI_THIS(iface);
106     FIXME("(%p)->()\n", This);
107     return E_NOTIMPL;
108 }
109
110 static HRESULT WINAPI Uri_GetAbsoluteUri(IUri *iface, BSTR *pstrAbsoluteUri)
111 {
112     Uri *This = URI_THIS(iface);
113     FIXME("(%p)->(%p)\n", This, pstrAbsoluteUri);
114     return E_NOTIMPL;
115 }
116
117 static HRESULT WINAPI Uri_GetAuthority(IUri *iface, BSTR *pstrAuthority)
118 {
119     Uri *This = URI_THIS(iface);
120     FIXME("(%p)->(%p)\n", This, pstrAuthority);
121     return E_NOTIMPL;
122 }
123
124 static HRESULT WINAPI Uri_GetDisplayUri(IUri *iface, BSTR *pstrDisplayUri)
125 {
126     Uri *This = URI_THIS(iface);
127     FIXME("(%p)->(%p)\n", This, pstrDisplayUri);
128     return E_NOTIMPL;
129 }
130
131 static HRESULT WINAPI Uri_GetDomain(IUri *iface, BSTR *pstrDomain)
132 {
133     Uri *This = URI_THIS(iface);
134     FIXME("(%p)->(%p)\n", This, pstrDomain);
135     return E_NOTIMPL;
136 }
137
138 static HRESULT WINAPI Uri_GetExtension(IUri *iface, BSTR *pstrExtension)
139 {
140     Uri *This = URI_THIS(iface);
141     FIXME("(%p)->(%p)\n", This, pstrExtension);
142     return E_NOTIMPL;
143 }
144
145 static HRESULT WINAPI Uri_GetFragment(IUri *iface, BSTR *pstrFragment)
146 {
147     Uri *This = URI_THIS(iface);
148     FIXME("(%p)->(%p)\n", This, pstrFragment);
149     return E_NOTIMPL;
150 }
151
152 static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
153 {
154     Uri *This = URI_THIS(iface);
155     FIXME("(%p)->(%p)\n", This, pstrHost);
156     return E_NOTIMPL;
157 }
158
159 static HRESULT WINAPI Uri_GetPassword(IUri *iface, BSTR *pstrPassword)
160 {
161     Uri *This = URI_THIS(iface);
162     FIXME("(%p)->(%p)\n", This, pstrPassword);
163     return E_NOTIMPL;
164 }
165
166 static HRESULT WINAPI Uri_GetPath(IUri *iface, BSTR *pstrPath)
167 {
168     Uri *This = URI_THIS(iface);
169     FIXME("(%p)->(%p)\n", This, pstrPath);
170     return E_NOTIMPL;
171 }
172
173 static HRESULT WINAPI Uri_GetPathAndQuery(IUri *iface, BSTR *pstrPathAndQuery)
174 {
175     Uri *This = URI_THIS(iface);
176     FIXME("(%p)->(%p)\n", This, pstrPathAndQuery);
177     return E_NOTIMPL;
178 }
179
180 static HRESULT WINAPI Uri_GetQuery(IUri *iface, BSTR *pstrQuery)
181 {
182     Uri *This = URI_THIS(iface);
183     FIXME("(%p)->(%p)\n", This, pstrQuery);
184     return E_NOTIMPL;
185 }
186
187 static HRESULT WINAPI Uri_GetRawUri(IUri *iface, BSTR *pstrRawUri)
188 {
189     Uri *This = URI_THIS(iface);
190     FIXME("(%p)->(%p)\n", This, pstrRawUri);
191     return E_NOTIMPL;
192 }
193
194 static HRESULT WINAPI Uri_GetSchemeName(IUri *iface, BSTR *pstrSchemeName)
195 {
196     Uri *This = URI_THIS(iface);
197     FIXME("(%p)->(%p)\n", This, pstrSchemeName);
198     return E_NOTIMPL;
199 }
200
201 static HRESULT WINAPI Uri_GetUserInfo(IUri *iface, BSTR *pstrUserInfo)
202 {
203     Uri *This = URI_THIS(iface);
204     FIXME("(%p)->(%p)\n", This, pstrUserInfo);
205     return E_NOTIMPL;
206 }
207
208 static HRESULT WINAPI Uri_GetUserName(IUri *iface, BSTR *pstrUserName)
209 {
210     Uri *This = URI_THIS(iface);
211     FIXME("(%p)->(%p)\n", This, pstrUserName);
212     return E_NOTIMPL;
213 }
214
215 static HRESULT WINAPI Uri_GetHostType(IUri *iface, DWORD *pdwHostType)
216 {
217     Uri *This = URI_THIS(iface);
218     FIXME("(%p)->(%p)\n", This, pdwHostType);
219     return E_NOTIMPL;
220 }
221
222 static HRESULT WINAPI Uri_GetPort(IUri *iface, DWORD *pdwPort)
223 {
224     Uri *This = URI_THIS(iface);
225     FIXME("(%p)->(%p)\n", This, pdwPort);
226     return E_NOTIMPL;
227 }
228
229 static HRESULT WINAPI Uri_GetScheme(IUri *iface, DWORD *pdwScheme)
230 {
231     Uri *This = URI_THIS(iface);
232     FIXME("(%p)->(%p)\n", This, pdwScheme);
233     return E_NOTIMPL;
234 }
235
236 static HRESULT WINAPI Uri_GetZone(IUri *iface, DWORD *pdwZone)
237 {
238     Uri *This = URI_THIS(iface);
239     FIXME("(%p)->(%p)\n", This, pdwZone);
240     return E_NOTIMPL;
241 }
242
243 static HRESULT WINAPI Uri_GetProperties(IUri *iface, DWORD *pdwProperties)
244 {
245     Uri *This = URI_THIS(iface);
246     FIXME("(%p)->(%p)\n", This, pdwProperties);
247     return E_NOTIMPL;
248 }
249
250 static HRESULT WINAPI Uri_IsEqual(IUri *iface, IUri *pUri, BOOL *pfEqual)
251 {
252     Uri *This = URI_THIS(iface);
253     FIXME("(%p)->(%p %p)\n", This, pUri, pfEqual);
254     return E_NOTIMPL;
255 }
256
257 #undef URI_THIS
258
259 static const IUriVtbl UriVtbl = {
260     Uri_QueryInterface,
261     Uri_AddRef,
262     Uri_Release,
263     Uri_GetPropertyBSTR,
264     Uri_GetPropertyLength,
265     Uri_GetPropertyDWORD,
266     Uri_HasProperty,
267     Uri_GetAbsoluteUri,
268     Uri_GetAuthority,
269     Uri_GetDisplayUri,
270     Uri_GetDomain,
271     Uri_GetExtension,
272     Uri_GetFragment,
273     Uri_GetHost,
274     Uri_GetPassword,
275     Uri_GetPath,
276     Uri_GetPathAndQuery,
277     Uri_GetQuery,
278     Uri_GetRawUri,
279     Uri_GetSchemeName,
280     Uri_GetUserInfo,
281     Uri_GetUserName,
282     Uri_GetHostType,
283     Uri_GetPort,
284     Uri_GetScheme,
285     Uri_GetZone,
286     Uri_GetProperties,
287     Uri_IsEqual
288 };
289
290 /***********************************************************************
291  *           CreateUri (urlmon.@)
292  */
293 HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
294 {
295     Uri *ret;
296
297     TRACE("(%s %x %x %p)\n", debugstr_w(pwzURI), dwFlags, (DWORD)dwReserved, ppURI);
298
299     if(!ppURI)
300         return E_INVALIDARG;
301
302     if(!pwzURI) {
303         *ppURI = NULL;
304         return E_INVALIDARG;
305     }
306
307     ret = heap_alloc(sizeof(Uri));
308     if(!ret)
309         return E_OUTOFMEMORY;
310
311     ret->lpIUriVtbl = &UriVtbl;
312     ret->ref = 1;
313
314     *ppURI = URI(ret);
315     return S_OK;
316 }
317
318 #define URIBUILDER_THIS(iface) DEFINE_THIS(UriBuilder, IUriBuilder, iface)
319
320 static HRESULT WINAPI UriBuilder_QueryInterface(IUriBuilder *iface, REFIID riid, void **ppv)
321 {
322     UriBuilder *This = URIBUILDER_THIS(iface);
323
324     if(IsEqualGUID(&IID_IUnknown, riid)) {
325         TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
326         *ppv = URIBUILDER(This);
327     }else if(IsEqualGUID(&IID_IUriBuilder, riid)) {
328         TRACE("(%p)->(IID_IUri %p)\n", This, ppv);
329         *ppv = URIBUILDER(This);
330     }else {
331         TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
332         *ppv = NULL;
333         return E_NOINTERFACE;
334     }
335
336     IUnknown_AddRef((IUnknown*)*ppv);
337     return S_OK;
338 }
339
340 static ULONG WINAPI UriBuilder_AddRef(IUriBuilder *iface)
341 {
342     UriBuilder *This = URIBUILDER_THIS(iface);
343     LONG ref = InterlockedIncrement(&This->ref);
344
345     TRACE("(%p) ref=%d\n", This, ref);
346
347     return ref;
348 }
349
350 static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
351 {
352     UriBuilder *This = URIBUILDER_THIS(iface);
353     LONG ref = InterlockedDecrement(&This->ref);
354
355     TRACE("(%p) ref=%d\n", This, ref);
356
357     if(!ref)
358         heap_free(This);
359
360     return ref;
361 }
362
363 static HRESULT WINAPI UriBuilder_CreateUriSimple(IUriBuilder *iface,
364                                                  DWORD        dwAllowEncodingPropertyMask,
365                                                  DWORD_PTR    dwReserved,
366                                                  IUri       **ppIUri)
367 {
368     UriBuilder *This = URIBUILDER_THIS(iface);
369     FIXME("(%p)->(%d %d %p)\n", This, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
370     return E_NOTIMPL;
371 }
372
373 static HRESULT WINAPI UriBuilder_CreateUri(IUriBuilder *iface,
374                                            DWORD        dwCreateFlags,
375                                            DWORD        dwAllowEncodingPropertyMask,
376                                            DWORD_PTR    dwReserved,
377                                            IUri       **ppIUri)
378 {
379     UriBuilder *This = URIBUILDER_THIS(iface);
380     FIXME("(%p)->(0x%08x %d %d %p)\n", This, dwCreateFlags, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
381     return E_NOTIMPL;
382 }
383
384 static HRESULT WINAPI UriBuilder_CreateUriWithFlags(IUriBuilder *iface,
385                                          DWORD        dwCreateFlags,
386                                          DWORD        dwUriBuilderFlags,
387                                          DWORD        dwAllowEncodingPropertyMask,
388                                          DWORD_PTR    dwReserved,
389                                          IUri       **ppIUri)
390 {
391     UriBuilder *This = URIBUILDER_THIS(iface);
392     FIXME("(%p)->(0x%08x 0x%08x %d %d %p)\n", This, dwCreateFlags, dwUriBuilderFlags,
393         dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
394     return E_NOTIMPL;
395 }
396
397 static HRESULT WINAPI  UriBuilder_GetIUri(IUriBuilder *iface, IUri **ppIUri)
398 {
399     UriBuilder *This = URIBUILDER_THIS(iface);
400     FIXME("(%p)->(%p)\n", This, ppIUri);
401     return E_NOTIMPL;
402 }
403
404 static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri)
405 {
406     UriBuilder *This = URIBUILDER_THIS(iface);
407     FIXME("(%p)->(%p)\n", This, pIUri);
408     return E_NOTIMPL;
409 }
410
411 static HRESULT WINAPI UriBuilder_GetFragment(IUriBuilder *iface, DWORD *pcchFragment, LPCWSTR *ppwzFragment)
412 {
413     UriBuilder *This = URIBUILDER_THIS(iface);
414     FIXME("(%p)->(%p %p)\n", This, pcchFragment, ppwzFragment);
415     return E_NOTIMPL;
416 }
417
418 static HRESULT WINAPI UriBuilder_GetHost(IUriBuilder *iface, DWORD *pcchHost, LPCWSTR *ppwzHost)
419 {
420     UriBuilder *This = URIBUILDER_THIS(iface);
421     FIXME("(%p)->(%p %p)\n", This, pcchHost, ppwzHost);
422     return E_NOTIMPL;
423 }
424
425 static HRESULT WINAPI UriBuilder_GetPassword(IUriBuilder *iface, DWORD *pcchPassword, LPCWSTR *ppwzPassword)
426 {
427     UriBuilder *This = URIBUILDER_THIS(iface);
428     FIXME("(%p)->(%p %p)\n", This, pcchPassword, ppwzPassword);
429     return E_NOTIMPL;
430 }
431
432 static HRESULT WINAPI UriBuilder_GetPath(IUriBuilder *iface, DWORD *pcchPath, LPCWSTR *ppwzPath)
433 {
434     UriBuilder *This = URIBUILDER_THIS(iface);
435     FIXME("(%p)->(%p %p)\n", This, pcchPath, ppwzPath);
436     return E_NOTIMPL;
437 }
438
439 static HRESULT WINAPI UriBuilder_GetPort(IUriBuilder *iface, BOOL *pfHasPort, DWORD *pdwPort)
440 {
441     UriBuilder *This = URIBUILDER_THIS(iface);
442     FIXME("(%p)->(%p %p)\n", This, pfHasPort, pdwPort);
443     return E_NOTIMPL;
444 }
445
446 static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery, LPCWSTR *ppwzQuery)
447 {
448     UriBuilder *This = URIBUILDER_THIS(iface);
449     FIXME("(%p)->(%p %p)\n", This, pcchQuery, ppwzQuery);
450     return E_NOTIMPL;
451 }
452
453 static HRESULT WINAPI UriBuilder_GetSchemeName(IUriBuilder *iface, DWORD *pcchSchemeName, LPCWSTR *ppwzSchemeName)
454 {
455     UriBuilder *This = URIBUILDER_THIS(iface);
456     FIXME("(%p)->(%p %p)\n", This, pcchSchemeName, ppwzSchemeName);
457     return E_NOTIMPL;
458 }
459
460 static HRESULT WINAPI UriBuilder_GetUserName(IUriBuilder *iface, DWORD *pcchUserName, LPCWSTR *ppwzUserName)
461 {
462     UriBuilder *This = URIBUILDER_THIS(iface);
463     FIXME("(%p)->(%p %p)\n", This, pcchUserName, ppwzUserName);
464     return E_NOTIMPL;
465 }
466
467 static HRESULT WINAPI UriBuilder_SetFragment(IUriBuilder *iface, LPCWSTR pwzNewValue)
468 {
469     UriBuilder *This = URIBUILDER_THIS(iface);
470     FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
471     return E_NOTIMPL;
472 }
473
474 static HRESULT WINAPI UriBuilder_SetHost(IUriBuilder *iface, LPCWSTR pwzNewValue)
475 {
476     UriBuilder *This = URIBUILDER_THIS(iface);
477     FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
478     return E_NOTIMPL;
479 }
480
481 static HRESULT WINAPI UriBuilder_SetPassword(IUriBuilder *iface, LPCWSTR pwzNewValue)
482 {
483     UriBuilder *This = URIBUILDER_THIS(iface);
484     FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
485     return E_NOTIMPL;
486 }
487
488 static HRESULT WINAPI UriBuilder_SetPath(IUriBuilder *iface, LPCWSTR pwzNewValue)
489 {
490     UriBuilder *This = URIBUILDER_THIS(iface);
491     FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
492     return E_NOTIMPL;
493 }
494
495 static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWORD dwNewValue)
496 {
497     UriBuilder *This = URIBUILDER_THIS(iface);
498     FIXME("(%p)->(%d %d)\n", This, fHasPort, dwNewValue);
499     return E_NOTIMPL;
500 }
501
502 static HRESULT WINAPI UriBuilder_SetQuery(IUriBuilder *iface, LPCWSTR pwzNewValue)
503 {
504     UriBuilder *This = URIBUILDER_THIS(iface);
505     FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
506     return E_NOTIMPL;
507 }
508
509 static HRESULT WINAPI UriBuilder_SetSchemeName(IUriBuilder *iface, LPCWSTR pwzNewValue)
510 {
511     UriBuilder *This = URIBUILDER_THIS(iface);
512     FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
513     return E_NOTIMPL;
514 }
515
516 static HRESULT WINAPI UriBuilder_SetUserName(IUriBuilder *iface, LPCWSTR pwzNewValue)
517 {
518     UriBuilder *This = URIBUILDER_THIS(iface);
519     FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
520     return E_NOTIMPL;
521 }
522
523 static HRESULT WINAPI UriBuilder_RemoveProperties(IUriBuilder *iface, DWORD dwPropertyMask)
524 {
525     UriBuilder *This = URIBUILDER_THIS(iface);
526     FIXME("(%p)->(0x%08x)\n", This, dwPropertyMask);
527     return E_NOTIMPL;
528 }
529
530 static HRESULT WINAPI UriBuilder_HasBeenModified(IUriBuilder *iface, BOOL *pfModified)
531 {
532     UriBuilder *This = URIBUILDER_THIS(iface);
533     FIXME("(%p)->(%p)\n", This, pfModified);
534     return E_NOTIMPL;
535 }
536
537 #undef URIBUILDER_THIS
538
539 static const IUriBuilderVtbl UriBuilderVtbl = {
540     UriBuilder_QueryInterface,
541     UriBuilder_AddRef,
542     UriBuilder_Release,
543     UriBuilder_CreateUriSimple,
544     UriBuilder_CreateUri,
545     UriBuilder_CreateUriWithFlags,
546     UriBuilder_GetIUri,
547     UriBuilder_SetIUri,
548     UriBuilder_GetFragment,
549     UriBuilder_GetHost,
550     UriBuilder_GetPassword,
551     UriBuilder_GetPath,
552     UriBuilder_GetPort,
553     UriBuilder_GetQuery,
554     UriBuilder_GetSchemeName,
555     UriBuilder_GetUserName,
556     UriBuilder_SetFragment,
557     UriBuilder_SetHost,
558     UriBuilder_SetPassword,
559     UriBuilder_SetPath,
560     UriBuilder_SetPort,
561     UriBuilder_SetQuery,
562     UriBuilder_SetSchemeName,
563     UriBuilder_SetUserName,
564     UriBuilder_RemoveProperties,
565     UriBuilder_HasBeenModified,
566 };
567
568 /***********************************************************************
569  *           CreateIUriBuilder (urlmon.@)
570  */
571 HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
572 {
573     UriBuilder *ret;
574
575     TRACE("(%p %x %x %p)\n", pIUri, dwFlags, (DWORD)dwReserved, ppIUriBuilder);
576
577     ret = heap_alloc(sizeof(UriBuilder));
578     if(!ret)
579         return E_OUTOFMEMORY;
580
581     ret->lpIUriBuilderVtbl = &UriBuilderVtbl;
582     ret->ref = 1;
583
584     *ppIUriBuilder = URIBUILDER(ret);
585     return S_OK;
586 }