push 1d8ffbc7e5e31cb02d564185c2f7d29830c376df
[wine/hacks.git] / dlls / urlmon / uri.c
blob27b0863c2cb2ca9df8add21c52915702a0713069
1 /*
2 * Copyright 2010 Jacek Caban for CodeWeavers
3 * Copyright 2010 Thomas Mullaly
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include "urlmon_main.h"
21 #include "wine/debug.h"
23 WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
25 typedef struct {
26 const IUriVtbl *lpIUriVtbl;
27 LONG ref;
28 } Uri;
30 typedef struct {
31 const IUriBuilderVtbl *lpIUriBuilderVtbl;
32 LONG ref;
33 } UriBuilder;
35 #define URI(x) ((IUri*) &(x)->lpIUriVtbl)
36 #define URIBUILDER(x) ((IUriBuilder*) &(x)->lpIUriBuilderVtbl)
38 #define URI_THIS(iface) DEFINE_THIS(Uri, IUri, iface)
40 static HRESULT WINAPI Uri_QueryInterface(IUri *iface, REFIID riid, void **ppv)
42 Uri *This = URI_THIS(iface);
44 if(IsEqualGUID(&IID_IUnknown, riid)) {
45 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
46 *ppv = URI(This);
47 }else if(IsEqualGUID(&IID_IUri, riid)) {
48 TRACE("(%p)->(IID_IUri %p)\n", This, ppv);
49 *ppv = URI(This);
50 }else {
51 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
52 *ppv = NULL;
53 return E_NOINTERFACE;
56 IUnknown_AddRef((IUnknown*)*ppv);
57 return S_OK;
60 static ULONG WINAPI Uri_AddRef(IUri *iface)
62 Uri *This = URI_THIS(iface);
63 LONG ref = InterlockedIncrement(&This->ref);
65 TRACE("(%p) ref=%d\n", This, ref);
67 return ref;
70 static ULONG WINAPI Uri_Release(IUri *iface)
72 Uri *This = URI_THIS(iface);
73 LONG ref = InterlockedDecrement(&This->ref);
75 TRACE("(%p) ref=%d\n", This, ref);
77 if(!ref)
78 heap_free(This);
80 return ref;
83 static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BSTR *pbstrProperty, DWORD dwFlags)
85 Uri *This = URI_THIS(iface);
86 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pbstrProperty, dwFlags);
87 return E_NOTIMPL;
90 static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
92 Uri *This = URI_THIS(iface);
93 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
94 return E_NOTIMPL;
97 static HRESULT WINAPI Uri_GetPropertyDWORD(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
99 Uri *This = URI_THIS(iface);
100 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
102 if(!pcchProperty)
103 return E_INVALIDARG;
105 /* Microsoft's implementation for the ZONE property of a URI seems to be lacking...
106 * From what I can tell, instead of checking which URLZONE the URI belongs to it
107 * simply assigns URLZONE_INVALID and returns E_NOTIMPL. This also applies to the GetZone
108 * function.
110 if(uriProp == Uri_PROPERTY_ZONE) {
111 *pcchProperty = URLZONE_INVALID;
112 return E_NOTIMPL;
115 return E_NOTIMPL;
118 static HRESULT WINAPI Uri_HasProperty(IUri *iface, Uri_PROPERTY uriProp, BOOL *pfHasProperty)
120 Uri *This = URI_THIS(iface);
121 FIXME("(%p)->()\n", This);
122 return E_NOTIMPL;
125 static HRESULT WINAPI Uri_GetAbsoluteUri(IUri *iface, BSTR *pstrAbsoluteUri)
127 Uri *This = URI_THIS(iface);
128 FIXME("(%p)->(%p)\n", This, pstrAbsoluteUri);
130 if(!pstrAbsoluteUri)
131 return E_POINTER;
133 return E_NOTIMPL;
136 static HRESULT WINAPI Uri_GetAuthority(IUri *iface, BSTR *pstrAuthority)
138 Uri *This = URI_THIS(iface);
139 FIXME("(%p)->(%p)\n", This, pstrAuthority);
141 if(!pstrAuthority)
142 return E_POINTER;
144 return E_NOTIMPL;
147 static HRESULT WINAPI Uri_GetDisplayUri(IUri *iface, BSTR *pstrDisplayUri)
149 Uri *This = URI_THIS(iface);
150 FIXME("(%p)->(%p)\n", This, pstrDisplayUri);
152 if(!pstrDisplayUri)
153 return E_POINTER;
155 return E_NOTIMPL;
158 static HRESULT WINAPI Uri_GetDomain(IUri *iface, BSTR *pstrDomain)
160 Uri *This = URI_THIS(iface);
161 FIXME("(%p)->(%p)\n", This, pstrDomain);
163 if(!pstrDomain)
164 return E_POINTER;
166 return E_NOTIMPL;
169 static HRESULT WINAPI Uri_GetExtension(IUri *iface, BSTR *pstrExtension)
171 Uri *This = URI_THIS(iface);
172 FIXME("(%p)->(%p)\n", This, pstrExtension);
174 if(!pstrExtension)
175 return E_POINTER;
177 return E_NOTIMPL;
180 static HRESULT WINAPI Uri_GetFragment(IUri *iface, BSTR *pstrFragment)
182 Uri *This = URI_THIS(iface);
183 FIXME("(%p)->(%p)\n", This, pstrFragment);
185 if(!pstrFragment)
186 return E_POINTER;
188 return E_NOTIMPL;
191 static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
193 Uri *This = URI_THIS(iface);
194 FIXME("(%p)->(%p)\n", This, pstrHost);
195 return E_NOTIMPL;
198 static HRESULT WINAPI Uri_GetPassword(IUri *iface, BSTR *pstrPassword)
200 Uri *This = URI_THIS(iface);
201 FIXME("(%p)->(%p)\n", This, pstrPassword);
203 if(!pstrPassword)
204 return E_POINTER;
206 return E_NOTIMPL;
209 static HRESULT WINAPI Uri_GetPath(IUri *iface, BSTR *pstrPath)
211 Uri *This = URI_THIS(iface);
212 FIXME("(%p)->(%p)\n", This, pstrPath);
214 if(!pstrPath)
215 return E_POINTER;
217 return E_NOTIMPL;
220 static HRESULT WINAPI Uri_GetPathAndQuery(IUri *iface, BSTR *pstrPathAndQuery)
222 Uri *This = URI_THIS(iface);
223 FIXME("(%p)->(%p)\n", This, pstrPathAndQuery);
225 if(!pstrPathAndQuery)
226 return E_POINTER;
228 return E_NOTIMPL;
231 static HRESULT WINAPI Uri_GetQuery(IUri *iface, BSTR *pstrQuery)
233 Uri *This = URI_THIS(iface);
234 FIXME("(%p)->(%p)\n", This, pstrQuery);
236 if(!pstrQuery)
237 return E_POINTER;
239 return E_NOTIMPL;
242 static HRESULT WINAPI Uri_GetRawUri(IUri *iface, BSTR *pstrRawUri)
244 Uri *This = URI_THIS(iface);
245 FIXME("(%p)->(%p)\n", This, pstrRawUri);
247 if(!pstrRawUri)
248 return E_POINTER;
250 return E_NOTIMPL;
253 static HRESULT WINAPI Uri_GetSchemeName(IUri *iface, BSTR *pstrSchemeName)
255 Uri *This = URI_THIS(iface);
256 FIXME("(%p)->(%p)\n", This, pstrSchemeName);
258 if(!pstrSchemeName)
259 return E_POINTER;
261 return E_NOTIMPL;
264 static HRESULT WINAPI Uri_GetUserInfo(IUri *iface, BSTR *pstrUserInfo)
266 Uri *This = URI_THIS(iface);
267 FIXME("(%p)->(%p)\n", This, pstrUserInfo);
269 if(!pstrUserInfo)
270 return E_POINTER;
272 return E_NOTIMPL;
275 static HRESULT WINAPI Uri_GetUserName(IUri *iface, BSTR *pstrUserName)
277 Uri *This = URI_THIS(iface);
278 FIXME("(%p)->(%p)\n", This, pstrUserName);
280 if(!pstrUserName)
281 return E_POINTER;
283 return E_NOTIMPL;
286 static HRESULT WINAPI Uri_GetHostType(IUri *iface, DWORD *pdwHostType)
288 Uri *This = URI_THIS(iface);
289 FIXME("(%p)->(%p)\n", This, pdwHostType);
291 if(!pdwHostType)
292 return E_INVALIDARG;
294 return E_NOTIMPL;
297 static HRESULT WINAPI Uri_GetPort(IUri *iface, DWORD *pdwPort)
299 Uri *This = URI_THIS(iface);
300 FIXME("(%p)->(%p)\n", This, pdwPort);
302 if(!pdwPort)
303 return E_INVALIDARG;
305 return E_NOTIMPL;
308 static HRESULT WINAPI Uri_GetScheme(IUri *iface, DWORD *pdwScheme)
310 Uri *This = URI_THIS(iface);
311 FIXME("(%p)->(%p)\n", This, pdwScheme);
313 if(!pdwScheme)
314 return E_INVALIDARG;
316 return E_NOTIMPL;
319 static HRESULT WINAPI Uri_GetZone(IUri *iface, DWORD *pdwZone)
321 Uri *This = URI_THIS(iface);
322 FIXME("(%p)->(%p)\n", This, pdwZone);
324 if(!pdwZone)
325 return E_INVALIDARG;
327 /* Microsoft doesn't seem to have this implemented yet... See
328 * the comment in Uri_GetPropertyDWORD for more about this.
330 *pdwZone = URLZONE_INVALID;
331 return E_NOTIMPL;
334 static HRESULT WINAPI Uri_GetProperties(IUri *iface, DWORD *pdwProperties)
336 Uri *This = URI_THIS(iface);
337 FIXME("(%p)->(%p)\n", This, pdwProperties);
338 return E_NOTIMPL;
341 static HRESULT WINAPI Uri_IsEqual(IUri *iface, IUri *pUri, BOOL *pfEqual)
343 Uri *This = URI_THIS(iface);
344 FIXME("(%p)->(%p %p)\n", This, pUri, pfEqual);
345 return E_NOTIMPL;
348 #undef URI_THIS
350 static const IUriVtbl UriVtbl = {
351 Uri_QueryInterface,
352 Uri_AddRef,
353 Uri_Release,
354 Uri_GetPropertyBSTR,
355 Uri_GetPropertyLength,
356 Uri_GetPropertyDWORD,
357 Uri_HasProperty,
358 Uri_GetAbsoluteUri,
359 Uri_GetAuthority,
360 Uri_GetDisplayUri,
361 Uri_GetDomain,
362 Uri_GetExtension,
363 Uri_GetFragment,
364 Uri_GetHost,
365 Uri_GetPassword,
366 Uri_GetPath,
367 Uri_GetPathAndQuery,
368 Uri_GetQuery,
369 Uri_GetRawUri,
370 Uri_GetSchemeName,
371 Uri_GetUserInfo,
372 Uri_GetUserName,
373 Uri_GetHostType,
374 Uri_GetPort,
375 Uri_GetScheme,
376 Uri_GetZone,
377 Uri_GetProperties,
378 Uri_IsEqual
381 /***********************************************************************
382 * CreateUri (urlmon.@)
384 HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
386 Uri *ret;
388 TRACE("(%s %x %x %p)\n", debugstr_w(pwzURI), dwFlags, (DWORD)dwReserved, ppURI);
390 if(!ppURI)
391 return E_INVALIDARG;
393 if(!pwzURI) {
394 *ppURI = NULL;
395 return E_INVALIDARG;
398 ret = heap_alloc(sizeof(Uri));
399 if(!ret)
400 return E_OUTOFMEMORY;
402 ret->lpIUriVtbl = &UriVtbl;
403 ret->ref = 1;
405 *ppURI = URI(ret);
406 return S_OK;
409 #define URIBUILDER_THIS(iface) DEFINE_THIS(UriBuilder, IUriBuilder, iface)
411 static HRESULT WINAPI UriBuilder_QueryInterface(IUriBuilder *iface, REFIID riid, void **ppv)
413 UriBuilder *This = URIBUILDER_THIS(iface);
415 if(IsEqualGUID(&IID_IUnknown, riid)) {
416 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
417 *ppv = URIBUILDER(This);
418 }else if(IsEqualGUID(&IID_IUriBuilder, riid)) {
419 TRACE("(%p)->(IID_IUri %p)\n", This, ppv);
420 *ppv = URIBUILDER(This);
421 }else {
422 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
423 *ppv = NULL;
424 return E_NOINTERFACE;
427 IUnknown_AddRef((IUnknown*)*ppv);
428 return S_OK;
431 static ULONG WINAPI UriBuilder_AddRef(IUriBuilder *iface)
433 UriBuilder *This = URIBUILDER_THIS(iface);
434 LONG ref = InterlockedIncrement(&This->ref);
436 TRACE("(%p) ref=%d\n", This, ref);
438 return ref;
441 static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
443 UriBuilder *This = URIBUILDER_THIS(iface);
444 LONG ref = InterlockedDecrement(&This->ref);
446 TRACE("(%p) ref=%d\n", This, ref);
448 if(!ref)
449 heap_free(This);
451 return ref;
454 static HRESULT WINAPI UriBuilder_CreateUriSimple(IUriBuilder *iface,
455 DWORD dwAllowEncodingPropertyMask,
456 DWORD_PTR dwReserved,
457 IUri **ppIUri)
459 UriBuilder *This = URIBUILDER_THIS(iface);
460 FIXME("(%p)->(%d %d %p)\n", This, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
461 return E_NOTIMPL;
464 static HRESULT WINAPI UriBuilder_CreateUri(IUriBuilder *iface,
465 DWORD dwCreateFlags,
466 DWORD dwAllowEncodingPropertyMask,
467 DWORD_PTR dwReserved,
468 IUri **ppIUri)
470 UriBuilder *This = URIBUILDER_THIS(iface);
471 FIXME("(%p)->(0x%08x %d %d %p)\n", This, dwCreateFlags, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
472 return E_NOTIMPL;
475 static HRESULT WINAPI UriBuilder_CreateUriWithFlags(IUriBuilder *iface,
476 DWORD dwCreateFlags,
477 DWORD dwUriBuilderFlags,
478 DWORD dwAllowEncodingPropertyMask,
479 DWORD_PTR dwReserved,
480 IUri **ppIUri)
482 UriBuilder *This = URIBUILDER_THIS(iface);
483 FIXME("(%p)->(0x%08x 0x%08x %d %d %p)\n", This, dwCreateFlags, dwUriBuilderFlags,
484 dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
485 return E_NOTIMPL;
488 static HRESULT WINAPI UriBuilder_GetIUri(IUriBuilder *iface, IUri **ppIUri)
490 UriBuilder *This = URIBUILDER_THIS(iface);
491 FIXME("(%p)->(%p)\n", This, ppIUri);
492 return E_NOTIMPL;
495 static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri)
497 UriBuilder *This = URIBUILDER_THIS(iface);
498 FIXME("(%p)->(%p)\n", This, pIUri);
499 return E_NOTIMPL;
502 static HRESULT WINAPI UriBuilder_GetFragment(IUriBuilder *iface, DWORD *pcchFragment, LPCWSTR *ppwzFragment)
504 UriBuilder *This = URIBUILDER_THIS(iface);
505 FIXME("(%p)->(%p %p)\n", This, pcchFragment, ppwzFragment);
506 return E_NOTIMPL;
509 static HRESULT WINAPI UriBuilder_GetHost(IUriBuilder *iface, DWORD *pcchHost, LPCWSTR *ppwzHost)
511 UriBuilder *This = URIBUILDER_THIS(iface);
512 FIXME("(%p)->(%p %p)\n", This, pcchHost, ppwzHost);
513 return E_NOTIMPL;
516 static HRESULT WINAPI UriBuilder_GetPassword(IUriBuilder *iface, DWORD *pcchPassword, LPCWSTR *ppwzPassword)
518 UriBuilder *This = URIBUILDER_THIS(iface);
519 FIXME("(%p)->(%p %p)\n", This, pcchPassword, ppwzPassword);
520 return E_NOTIMPL;
523 static HRESULT WINAPI UriBuilder_GetPath(IUriBuilder *iface, DWORD *pcchPath, LPCWSTR *ppwzPath)
525 UriBuilder *This = URIBUILDER_THIS(iface);
526 FIXME("(%p)->(%p %p)\n", This, pcchPath, ppwzPath);
527 return E_NOTIMPL;
530 static HRESULT WINAPI UriBuilder_GetPort(IUriBuilder *iface, BOOL *pfHasPort, DWORD *pdwPort)
532 UriBuilder *This = URIBUILDER_THIS(iface);
533 FIXME("(%p)->(%p %p)\n", This, pfHasPort, pdwPort);
534 return E_NOTIMPL;
537 static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery, LPCWSTR *ppwzQuery)
539 UriBuilder *This = URIBUILDER_THIS(iface);
540 FIXME("(%p)->(%p %p)\n", This, pcchQuery, ppwzQuery);
541 return E_NOTIMPL;
544 static HRESULT WINAPI UriBuilder_GetSchemeName(IUriBuilder *iface, DWORD *pcchSchemeName, LPCWSTR *ppwzSchemeName)
546 UriBuilder *This = URIBUILDER_THIS(iface);
547 FIXME("(%p)->(%p %p)\n", This, pcchSchemeName, ppwzSchemeName);
548 return E_NOTIMPL;
551 static HRESULT WINAPI UriBuilder_GetUserName(IUriBuilder *iface, DWORD *pcchUserName, LPCWSTR *ppwzUserName)
553 UriBuilder *This = URIBUILDER_THIS(iface);
554 FIXME("(%p)->(%p %p)\n", This, pcchUserName, ppwzUserName);
555 return E_NOTIMPL;
558 static HRESULT WINAPI UriBuilder_SetFragment(IUriBuilder *iface, LPCWSTR pwzNewValue)
560 UriBuilder *This = URIBUILDER_THIS(iface);
561 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
562 return E_NOTIMPL;
565 static HRESULT WINAPI UriBuilder_SetHost(IUriBuilder *iface, LPCWSTR pwzNewValue)
567 UriBuilder *This = URIBUILDER_THIS(iface);
568 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
569 return E_NOTIMPL;
572 static HRESULT WINAPI UriBuilder_SetPassword(IUriBuilder *iface, LPCWSTR pwzNewValue)
574 UriBuilder *This = URIBUILDER_THIS(iface);
575 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
576 return E_NOTIMPL;
579 static HRESULT WINAPI UriBuilder_SetPath(IUriBuilder *iface, LPCWSTR pwzNewValue)
581 UriBuilder *This = URIBUILDER_THIS(iface);
582 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
583 return E_NOTIMPL;
586 static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWORD dwNewValue)
588 UriBuilder *This = URIBUILDER_THIS(iface);
589 FIXME("(%p)->(%d %d)\n", This, fHasPort, dwNewValue);
590 return E_NOTIMPL;
593 static HRESULT WINAPI UriBuilder_SetQuery(IUriBuilder *iface, LPCWSTR pwzNewValue)
595 UriBuilder *This = URIBUILDER_THIS(iface);
596 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
597 return E_NOTIMPL;
600 static HRESULT WINAPI UriBuilder_SetSchemeName(IUriBuilder *iface, LPCWSTR pwzNewValue)
602 UriBuilder *This = URIBUILDER_THIS(iface);
603 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
604 return E_NOTIMPL;
607 static HRESULT WINAPI UriBuilder_SetUserName(IUriBuilder *iface, LPCWSTR pwzNewValue)
609 UriBuilder *This = URIBUILDER_THIS(iface);
610 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
611 return E_NOTIMPL;
614 static HRESULT WINAPI UriBuilder_RemoveProperties(IUriBuilder *iface, DWORD dwPropertyMask)
616 UriBuilder *This = URIBUILDER_THIS(iface);
617 FIXME("(%p)->(0x%08x)\n", This, dwPropertyMask);
618 return E_NOTIMPL;
621 static HRESULT WINAPI UriBuilder_HasBeenModified(IUriBuilder *iface, BOOL *pfModified)
623 UriBuilder *This = URIBUILDER_THIS(iface);
624 FIXME("(%p)->(%p)\n", This, pfModified);
625 return E_NOTIMPL;
628 #undef URIBUILDER_THIS
630 static const IUriBuilderVtbl UriBuilderVtbl = {
631 UriBuilder_QueryInterface,
632 UriBuilder_AddRef,
633 UriBuilder_Release,
634 UriBuilder_CreateUriSimple,
635 UriBuilder_CreateUri,
636 UriBuilder_CreateUriWithFlags,
637 UriBuilder_GetIUri,
638 UriBuilder_SetIUri,
639 UriBuilder_GetFragment,
640 UriBuilder_GetHost,
641 UriBuilder_GetPassword,
642 UriBuilder_GetPath,
643 UriBuilder_GetPort,
644 UriBuilder_GetQuery,
645 UriBuilder_GetSchemeName,
646 UriBuilder_GetUserName,
647 UriBuilder_SetFragment,
648 UriBuilder_SetHost,
649 UriBuilder_SetPassword,
650 UriBuilder_SetPath,
651 UriBuilder_SetPort,
652 UriBuilder_SetQuery,
653 UriBuilder_SetSchemeName,
654 UriBuilder_SetUserName,
655 UriBuilder_RemoveProperties,
656 UriBuilder_HasBeenModified,
659 /***********************************************************************
660 * CreateIUriBuilder (urlmon.@)
662 HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
664 UriBuilder *ret;
666 TRACE("(%p %x %x %p)\n", pIUri, dwFlags, (DWORD)dwReserved, ppIUriBuilder);
668 ret = heap_alloc(sizeof(UriBuilder));
669 if(!ret)
670 return E_OUTOFMEMORY;
672 ret->lpIUriBuilderVtbl = &UriBuilderVtbl;
673 ret->ref = 1;
675 *ppIUriBuilder = URIBUILDER(ret);
676 return S_OK;