<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Thomas,<br>
    <br>
    On 9/3/10 1:19 AM, Thomas Mullaly wrote:
    <blockquote
      cite="mid:AANLkTim8xWS6NJFRXtJiQZkfeSqKK6u=5ZoTPeQiNn88@mail.gmail.com"
      type="cite">
      <div>---</div>
      <div>&nbsp;dlls/urlmon/tests/uri.c | &nbsp; 22 ++++++++++++-</div>
      <div>&nbsp;dlls/urlmon/uri.c &nbsp; &nbsp; &nbsp; | &nbsp; 80
        ++++++++++++++++++++++++++++++++++++++++++----</div>
      <div>&nbsp;2 files changed, 93 insertions(+), 9 deletions(-)</div>
      <br>
    </blockquote>
    <pre wrap="">+static HRESULT setup_builder_properties(UriBuilder <b class="moz-txt-star"><span class="moz-txt-tag">*</span>builder, const Uri<span class="moz-txt-tag">*</span></b> uri) {
+    if(uri-&gt;fragment_start &gt; -1) {
+        builder-&gt;fragment = heap_alloc((uri-&gt;fragment_len+1)*sizeof(WCHAR));
+        if(!builder-&gt;fragment)
+            return E_OUTOFMEMORY;
+
+        memcpy(builder-&gt;fragment, uri-&gt;canon_uri+uri-&gt;fragment_start, uri-&gt;fragment_len*sizeof(WCHAR));
+        builder-&gt;fragment[uri-&gt;fragment_len] = '\0';
+        builder-&gt;fragment_len = uri-&gt;fragment_len;
+    }
+
+    return S_OK;
+}
</pre>
    <br>
    I don't think it's a good idea. It should be possible to avoid
    fetching all URI properties here. You can do it, eg. on demand, when
    you get a call to GetFragment and the fragment is not everwriten by
    SetFragment call. Thinking about it, the way these APIs work
    suggests that Uri object should store null-terminated properties
    that we could return here, but it may be too far conclusion.<br>
    <br>
    Jacek<br>
  </body>
</html>