Sync trunk.
[reactos.git] / dll / win32 / urlmon / uri.c
1 /*
2 * Copyright 2010 Jacek Caban for CodeWeavers
3 * Copyright 2010 Thomas Mullaly
4 *
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.
9 *
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.
14 *
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
18 */
19
20 #include "urlmon_main.h"
21 #include "wine/debug.h"
22
23 WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
24
25 typedef struct {
26 const IUriVtbl *lpIUriVtbl;
27 LONG ref;
28 } Uri;
29
30 typedef struct {
31 const IUriBuilderVtbl *lpIUriBuilderVtbl;
32 LONG ref;
33 } UriBuilder;
34
35 #define URI(x) ((IUri*) &(x)->lpIUriVtbl)
36 #define URIBUILDER(x) ((IUriBuilder*) &(x)->lpIUriBuilderVtbl)
37
38 #define URI_THIS(iface) DEFINE_THIS(Uri, IUri, iface)
39
40 static HRESULT WINAPI Uri_QueryInterface(IUri *iface, REFIID riid, void **ppv)
41 {
42 Uri *This = URI_THIS(iface);
43
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;
54 }
55
56 IUnknown_AddRef((IUnknown*)*ppv);
57 return S_OK;
58 }
59
60 static ULONG WINAPI Uri_AddRef(IUri *iface)
61 {
62 Uri *This = URI_THIS(iface);
63 LONG ref = InterlockedIncrement(&This->ref);
64
65 TRACE("(%p) ref=%d\n", This, ref);
66
67 return ref;
68 }
69
70 static ULONG WINAPI Uri_Release(IUri *iface)
71 {
72 Uri *This = URI_THIS(iface);
73 LONG ref = InterlockedDecrement(&This->ref);
74
75 TRACE("(%p) ref=%d\n", This, ref);
76
77 if(!ref)
78 heap_free(This);
79
80 return ref;
81 }
82
83 static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BSTR *pbstrProperty, DWORD dwFlags)
84 {
85 Uri *This = URI_THIS(iface);
86 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pbstrProperty, dwFlags);
87 return E_NOTIMPL;
88 }
89
90 static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
91 {
92 Uri *This = URI_THIS(iface);
93 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
94 return E_NOTIMPL;
95 }
96
97 static HRESULT WINAPI Uri_GetPropertyDWORD(IUri *iface, Uri_PROPERTY uriProp, DWORD *pcchProperty, DWORD dwFlags)
98 {
99 Uri *This = URI_THIS(iface);
100 FIXME("(%p)->(%d %p %x)\n", This, uriProp, pcchProperty, dwFlags);
101
102 if(!pcchProperty)
103 return E_INVALIDARG;
104
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.
109 */
110 if(uriProp == Uri_PROPERTY_ZONE) {
111 *pcchProperty = URLZONE_INVALID;
112 return E_NOTIMPL;
113 }
114
115 return E_NOTIMPL;
116 }
117
118 static HRESULT WINAPI Uri_HasProperty(IUri *iface, Uri_PROPERTY uriProp, BOOL *pfHasProperty)
119 {
120 Uri *This = URI_THIS(iface);
121 FIXME("(%p)->()\n", This);
122 return E_NOTIMPL;
123 }
124
125 static HRESULT WINAPI Uri_GetAbsoluteUri(IUri *iface, BSTR *pstrAbsoluteUri)
126 {
127 Uri *This = URI_THIS(iface);
128 FIXME("(%p)->(%p)\n", This, pstrAbsoluteUri);
129
130 if(!pstrAbsoluteUri)
131 return E_POINTER;
132
133 return E_NOTIMPL;
134 }
135
136 static HRESULT WINAPI Uri_GetAuthority(IUri *iface, BSTR *pstrAuthority)
137 {
138 Uri *This = URI_THIS(iface);
139 FIXME("(%p)->(%p)\n", This, pstrAuthority);
140
141 if(!pstrAuthority)
142 return E_POINTER;
143
144 return E_NOTIMPL;
145 }
146
147 static HRESULT WINAPI Uri_GetDisplayUri(IUri *iface, BSTR *pstrDisplayUri)
148 {
149 Uri *This = URI_THIS(iface);
150 FIXME("(%p)->(%p)\n", This, pstrDisplayUri);
151
152 if(!pstrDisplayUri)
153 return E_POINTER;
154
155 return E_NOTIMPL;
156 }
157
158 static HRESULT WINAPI Uri_GetDomain(IUri *iface, BSTR *pstrDomain)
159 {
160 Uri *This = URI_THIS(iface);
161 FIXME("(%p)->(%p)\n", This, pstrDomain);
162
163 if(!pstrDomain)
164 return E_POINTER;
165
166 return E_NOTIMPL;
167 }
168
169 static HRESULT WINAPI Uri_GetExtension(IUri *iface, BSTR *pstrExtension)
170 {
171 Uri *This = URI_THIS(iface);
172 FIXME("(%p)->(%p)\n", This, pstrExtension);
173
174 if(!pstrExtension)
175 return E_POINTER;
176
177 return E_NOTIMPL;
178 }
179
180 static HRESULT WINAPI Uri_GetFragment(IUri *iface, BSTR *pstrFragment)
181 {
182 Uri *This = URI_THIS(iface);
183 FIXME("(%p)->(%p)\n", This, pstrFragment);
184
185 if(!pstrFragment)
186 return E_POINTER;
187
188 return E_NOTIMPL;
189 }
190
191 static HRESULT WINAPI Uri_GetHost(IUri *iface, BSTR *pstrHost)
192 {
193 Uri *This = URI_THIS(iface);
194 FIXME("(%p)->(%p)\n", This, pstrHost);
195 return E_NOTIMPL;
196 }
197
198 static HRESULT WINAPI Uri_GetPassword(IUri *iface, BSTR *pstrPassword)
199 {
200 Uri *This = URI_THIS(iface);
201 FIXME("(%p)->(%p)\n", This, pstrPassword);
202
203 if(!pstrPassword)
204 return E_POINTER;
205
206 return E_NOTIMPL;
207 }
208
209 static HRESULT WINAPI Uri_GetPath(IUri *iface, BSTR *pstrPath)
210 {
211 Uri *This = URI_THIS(iface);
212 FIXME("(%p)->(%p)\n", This, pstrPath);
213
214 if(!pstrPath)
215 return E_POINTER;
216
217 return E_NOTIMPL;
218 }
219
220 static HRESULT WINAPI Uri_GetPathAndQuery(IUri *iface, BSTR *pstrPathAndQuery)
221 {
222 Uri *This = URI_THIS(iface);
223 FIXME("(%p)->(%p)\n", This, pstrPathAndQuery);
224
225 if(!pstrPathAndQuery)
226 return E_POINTER;
227
228 return E_NOTIMPL;
229 }
230
231 static HRESULT WINAPI Uri_GetQuery(IUri *iface, BSTR *pstrQuery)
232 {
233 Uri *This = URI_THIS(iface);
234 FIXME("(%p)->(%p)\n", This, pstrQuery);
235
236 if(!pstrQuery)
237 return E_POINTER;
238
239 return E_NOTIMPL;
240 }
241
242 static HRESULT WINAPI Uri_GetRawUri(IUri *iface, BSTR *pstrRawUri)
243 {
244 Uri *This = URI_THIS(iface);
245 FIXME("(%p)->(%p)\n", This, pstrRawUri);
246
247 if(!pstrRawUri)
248 return E_POINTER;
249
250 return E_NOTIMPL;
251 }
252
253 static HRESULT WINAPI Uri_GetSchemeName(IUri *iface, BSTR *pstrSchemeName)
254 {
255 Uri *This = URI_THIS(iface);
256 FIXME("(%p)->(%p)\n", This, pstrSchemeName);
257
258 if(!pstrSchemeName)
259 return E_POINTER;
260
261 return E_NOTIMPL;
262 }
263
264 static HRESULT WINAPI Uri_GetUserInfo(IUri *iface, BSTR *pstrUserInfo)
265 {
266 Uri *This = URI_THIS(iface);
267 FIXME("(%p)->(%p)\n", This, pstrUserInfo);
268
269 if(!pstrUserInfo)
270 return E_POINTER;
271
272 return E_NOTIMPL;
273 }
274
275 static HRESULT WINAPI Uri_GetUserName(IUri *iface, BSTR *pstrUserName)
276 {
277 Uri *This = URI_THIS(iface);
278 FIXME("(%p)->(%p)\n", This, pstrUserName);
279
280 if(!pstrUserName)
281 return E_POINTER;
282
283 return E_NOTIMPL;
284 }
285
286 static HRESULT WINAPI Uri_GetHostType(IUri *iface, DWORD *pdwHostType)
287 {
288 Uri *This = URI_THIS(iface);
289 FIXME("(%p)->(%p)\n", This, pdwHostType);
290
291 if(!pdwHostType)
292 return E_INVALIDARG;
293
294 return E_NOTIMPL;
295 }
296
297 static HRESULT WINAPI Uri_GetPort(IUri *iface, DWORD *pdwPort)
298 {
299 Uri *This = URI_THIS(iface);
300 FIXME("(%p)->(%p)\n", This, pdwPort);
301
302 if(!pdwPort)
303 return E_INVALIDARG;
304
305 return E_NOTIMPL;
306 }
307
308 static HRESULT WINAPI Uri_GetScheme(IUri *iface, DWORD *pdwScheme)
309 {
310 Uri *This = URI_THIS(iface);
311 FIXME("(%p)->(%p)\n", This, pdwScheme);
312
313 if(!pdwScheme)
314 return E_INVALIDARG;
315
316 return E_NOTIMPL;
317 }
318
319 static HRESULT WINAPI Uri_GetZone(IUri *iface, DWORD *pdwZone)
320 {
321 Uri *This = URI_THIS(iface);
322 FIXME("(%p)->(%p)\n", This, pdwZone);
323
324 if(!pdwZone)
325 return E_INVALIDARG;
326
327 /* Microsoft doesn't seem to have this implemented yet... See
328 * the comment in Uri_GetPropertyDWORD for more about this.
329 */
330 *pdwZone = URLZONE_INVALID;
331 return E_NOTIMPL;
332 }
333
334 static HRESULT WINAPI Uri_GetProperties(IUri *iface, DWORD *pdwProperties)
335 {
336 Uri *This = URI_THIS(iface);
337 FIXME("(%p)->(%p)\n", This, pdwProperties);
338 return E_NOTIMPL;
339 }
340
341 static HRESULT WINAPI Uri_IsEqual(IUri *iface, IUri *pUri, BOOL *pfEqual)
342 {
343 Uri *This = URI_THIS(iface);
344 FIXME("(%p)->(%p %p)\n", This, pUri, pfEqual);
345 return E_NOTIMPL;
346 }
347
348 #undef URI_THIS
349
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
379 };
380
381 /***********************************************************************
382 * CreateUri (urlmon.@)
383 */
384 HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
385 {
386 Uri *ret;
387
388 TRACE("(%s %x %x %p)\n", debugstr_w(pwzURI), dwFlags, (DWORD)dwReserved, ppURI);
389
390 if(!ppURI)
391 return E_INVALIDARG;
392
393 if(!pwzURI) {
394 *ppURI = NULL;
395 return E_INVALIDARG;
396 }
397
398 ret = heap_alloc(sizeof(Uri));
399 if(!ret)
400 return E_OUTOFMEMORY;
401
402 ret->lpIUriVtbl = &UriVtbl;
403 ret->ref = 1;
404
405 *ppURI = URI(ret);
406 return S_OK;
407 }
408
409 #define URIBUILDER_THIS(iface) DEFINE_THIS(UriBuilder, IUriBuilder, iface)
410
411 static HRESULT WINAPI UriBuilder_QueryInterface(IUriBuilder *iface, REFIID riid, void **ppv)
412 {
413 UriBuilder *This = URIBUILDER_THIS(iface);
414
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;
425 }
426
427 IUnknown_AddRef((IUnknown*)*ppv);
428 return S_OK;
429 }
430
431 static ULONG WINAPI UriBuilder_AddRef(IUriBuilder *iface)
432 {
433 UriBuilder *This = URIBUILDER_THIS(iface);
434 LONG ref = InterlockedIncrement(&This->ref);
435
436 TRACE("(%p) ref=%d\n", This, ref);
437
438 return ref;
439 }
440
441 static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
442 {
443 UriBuilder *This = URIBUILDER_THIS(iface);
444 LONG ref = InterlockedDecrement(&This->ref);
445
446 TRACE("(%p) ref=%d\n", This, ref);
447
448 if(!ref)
449 heap_free(This);
450
451 return ref;
452 }
453
454 static HRESULT WINAPI UriBuilder_CreateUriSimple(IUriBuilder *iface,
455 DWORD dwAllowEncodingPropertyMask,
456 DWORD_PTR dwReserved,
457 IUri **ppIUri)
458 {
459 UriBuilder *This = URIBUILDER_THIS(iface);
460 FIXME("(%p)->(%d %d %p)\n", This, dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
461 return E_NOTIMPL;
462 }
463
464 static HRESULT WINAPI UriBuilder_CreateUri(IUriBuilder *iface,
465 DWORD dwCreateFlags,
466 DWORD dwAllowEncodingPropertyMask,
467 DWORD_PTR dwReserved,
468 IUri **ppIUri)
469 {
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;
473 }
474
475 static HRESULT WINAPI UriBuilder_CreateUriWithFlags(IUriBuilder *iface,
476 DWORD dwCreateFlags,
477 DWORD dwUriBuilderFlags,
478 DWORD dwAllowEncodingPropertyMask,
479 DWORD_PTR dwReserved,
480 IUri **ppIUri)
481 {
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;
486 }
487
488 static HRESULT WINAPI UriBuilder_GetIUri(IUriBuilder *iface, IUri **ppIUri)
489 {
490 UriBuilder *This = URIBUILDER_THIS(iface);
491 FIXME("(%p)->(%p)\n", This, ppIUri);
492 return E_NOTIMPL;
493 }
494
495 static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri)
496 {
497 UriBuilder *This = URIBUILDER_THIS(iface);
498 FIXME("(%p)->(%p)\n", This, pIUri);
499 return E_NOTIMPL;
500 }
501
502 static HRESULT WINAPI UriBuilder_GetFragment(IUriBuilder *iface, DWORD *pcchFragment, LPCWSTR *ppwzFragment)
503 {
504 UriBuilder *This = URIBUILDER_THIS(iface);
505 FIXME("(%p)->(%p %p)\n", This, pcchFragment, ppwzFragment);
506 return E_NOTIMPL;
507 }
508
509 static HRESULT WINAPI UriBuilder_GetHost(IUriBuilder *iface, DWORD *pcchHost, LPCWSTR *ppwzHost)
510 {
511 UriBuilder *This = URIBUILDER_THIS(iface);
512 FIXME("(%p)->(%p %p)\n", This, pcchHost, ppwzHost);
513 return E_NOTIMPL;
514 }
515
516 static HRESULT WINAPI UriBuilder_GetPassword(IUriBuilder *iface, DWORD *pcchPassword, LPCWSTR *ppwzPassword)
517 {
518 UriBuilder *This = URIBUILDER_THIS(iface);
519 FIXME("(%p)->(%p %p)\n", This, pcchPassword, ppwzPassword);
520 return E_NOTIMPL;
521 }
522
523 static HRESULT WINAPI UriBuilder_GetPath(IUriBuilder *iface, DWORD *pcchPath, LPCWSTR *ppwzPath)
524 {
525 UriBuilder *This = URIBUILDER_THIS(iface);
526 FIXME("(%p)->(%p %p)\n", This, pcchPath, ppwzPath);
527 return E_NOTIMPL;
528 }
529
530 static HRESULT WINAPI UriBuilder_GetPort(IUriBuilder *iface, BOOL *pfHasPort, DWORD *pdwPort)
531 {
532 UriBuilder *This = URIBUILDER_THIS(iface);
533 FIXME("(%p)->(%p %p)\n", This, pfHasPort, pdwPort);
534 return E_NOTIMPL;
535 }
536
537 static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery, LPCWSTR *ppwzQuery)
538 {
539 UriBuilder *This = URIBUILDER_THIS(iface);
540 FIXME("(%p)->(%p %p)\n", This, pcchQuery, ppwzQuery);
541 return E_NOTIMPL;
542 }
543
544 static HRESULT WINAPI UriBuilder_GetSchemeName(IUriBuilder *iface, DWORD *pcchSchemeName, LPCWSTR *ppwzSchemeName)
545 {
546 UriBuilder *This = URIBUILDER_THIS(iface);
547 FIXME("(%p)->(%p %p)\n", This, pcchSchemeName, ppwzSchemeName);
548 return E_NOTIMPL;
549 }
550
551 static HRESULT WINAPI UriBuilder_GetUserName(IUriBuilder *iface, DWORD *pcchUserName, LPCWSTR *ppwzUserName)
552 {
553 UriBuilder *This = URIBUILDER_THIS(iface);
554 FIXME("(%p)->(%p %p)\n", This, pcchUserName, ppwzUserName);
555 return E_NOTIMPL;
556 }
557
558 static HRESULT WINAPI UriBuilder_SetFragment(IUriBuilder *iface, LPCWSTR pwzNewValue)
559 {
560 UriBuilder *This = URIBUILDER_THIS(iface);
561 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
562 return E_NOTIMPL;
563 }
564
565 static HRESULT WINAPI UriBuilder_SetHost(IUriBuilder *iface, LPCWSTR pwzNewValue)
566 {
567 UriBuilder *This = URIBUILDER_THIS(iface);
568 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
569 return E_NOTIMPL;
570 }
571
572 static HRESULT WINAPI UriBuilder_SetPassword(IUriBuilder *iface, LPCWSTR pwzNewValue)
573 {
574 UriBuilder *This = URIBUILDER_THIS(iface);
575 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
576 return E_NOTIMPL;
577 }
578
579 static HRESULT WINAPI UriBuilder_SetPath(IUriBuilder *iface, LPCWSTR pwzNewValue)
580 {
581 UriBuilder *This = URIBUILDER_THIS(iface);
582 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
583 return E_NOTIMPL;
584 }
585
586 static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWORD dwNewValue)
587 {
588 UriBuilder *This = URIBUILDER_THIS(iface);
589 FIXME("(%p)->(%d %d)\n", This, fHasPort, dwNewValue);
590 return E_NOTIMPL;
591 }
592
593 static HRESULT WINAPI UriBuilder_SetQuery(IUriBuilder *iface, LPCWSTR pwzNewValue)
594 {
595 UriBuilder *This = URIBUILDER_THIS(iface);
596 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
597 return E_NOTIMPL;
598 }
599
600 static HRESULT WINAPI UriBuilder_SetSchemeName(IUriBuilder *iface, LPCWSTR pwzNewValue)
601 {
602 UriBuilder *This = URIBUILDER_THIS(iface);
603 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
604 return E_NOTIMPL;
605 }
606
607 static HRESULT WINAPI UriBuilder_SetUserName(IUriBuilder *iface, LPCWSTR pwzNewValue)
608 {
609 UriBuilder *This = URIBUILDER_THIS(iface);
610 FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
611 return E_NOTIMPL;
612 }
613
614 static HRESULT WINAPI UriBuilder_RemoveProperties(IUriBuilder *iface, DWORD dwPropertyMask)
615 {
616 UriBuilder *This = URIBUILDER_THIS(iface);
617 FIXME("(%p)->(0x%08x)\n", This, dwPropertyMask);
618 return E_NOTIMPL;
619 }
620
621 static HRESULT WINAPI UriBuilder_HasBeenModified(IUriBuilder *iface, BOOL *pfModified)
622 {
623 UriBuilder *This = URIBUILDER_THIS(iface);
624 FIXME("(%p)->(%p)\n", This, pfModified);
625 return E_NOTIMPL;
626 }
627
628 #undef URIBUILDER_THIS
629
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,
657 };
658
659 /***********************************************************************
660 * CreateIUriBuilder (urlmon.@)
661 */
662 HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved, IUriBuilder **ppIUriBuilder)
663 {
664 UriBuilder *ret;
665
666 TRACE("(%p %x %x %p)\n", pIUri, dwFlags, (DWORD)dwReserved, ppIUriBuilder);
667
668 ret = heap_alloc(sizeof(UriBuilder));
669 if(!ret)
670 return E_OUTOFMEMORY;
671
672 ret->lpIUriBuilderVtbl = &UriBuilderVtbl;
673 ret->ref = 1;
674
675 *ppIUriBuilder = URIBUILDER(ret);
676 return S_OK;
677 }