<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Philippe,<br>
      <br>
      On 04/05/15 22:04, Philippe Groarke wrote:<br>
    </div>
    <blockquote
      cite="mid:296D2C5D-ED76-473D-86C8-BB09CF033957@gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Hello,
      <div class=""><br class="">
      </div>
      <div class="">I am currently exploring Wine code base looking for
        low hanging fruits I can contribute to. I think
        CoInternetParseUrl and other URLMon stubs seem<b class="">ed</b>
        easy enough I want to try and implement some. I also see many
        URLMon stubs when using Wine for games and applications.</div>
      <div class=""><br class="">
      </div>
      <div class="">In CoInternetParseUrl, you use a switch case
        depending on the parameters passed. These in turn call specific
        methods for each parameter, which most do the same thing, call
        IInternetProtocolInfo_ParseUrl with the desired parse option .
        This function is defined in urlmon header. It seems to call a
        saved This on runtime, derefencing a saved (?) virtual table
        calling ParseUrl. It is also implemented in the header (static
        FORCEINLINE) and also calls the ParseUrl. <br>
      </div>
    </blockquote>
    <br>
    You should learn about COM interfaces and how they are used in C.<br>
    <br>
    <blockquote
      cite="mid:296D2C5D-ED76-473D-86C8-BB09CF033957@gmail.com"
      type="cite">
      <div class="">There are some STDMETHODCALLTYPE pure virtual
        methods inside a IInternetProtocoleInfo class. A struct virtual
        table IInternetProtocolInfoVtbl O_o I cannot find the actual
        ParseUrl implementation, though in misc.c, there are many
        references to CHECK_CALLED(ParseUrl) and SET_EXPECT(ParseUrl). I
        have no clue what is going on here to be completely honest.</div>
      <div class=""><br class="">
      </div>
      <div class="">Finally, in misc.c there are
        some�pCoInternetParseUrl and CoInternetParseUrl tests. But
        nothing that seems to implement what I need.</div>
      <div class=""><br class="">
      </div>
      <div class="">My question is, why go through all these hoops
        instead of implementing CoInternetParseUrl inside internet.c. I
        am sure there is good reasoning behind this, I would just like
        to understand why. Also, where do I implement ParseUrl or
        IInternetProtocolInfo_ParseUrl?</div>
    </blockquote>
    <br>
    All this is for pluggable protocols. Applications may define and
    register their own protocols, other than standard ones like http or
    file protocols, and have them transparently used by urlmon, which
    abstracts protocol-specific tasks. In this case, default parsing
    action may not be the right thing to do for given custom protocol
    and may be changed by implementing protocol-specific
    IInternetProtocolInfo. You may read more about it on MSDN [1].<br>
    <br>
    Cheers,<br>
    Jacek<br>
    <br>
    [1]
    <a class="moz-txt-link-freetext" href="https://msdn.microsoft.com/en-us/library/aa767743%28v=vs.85%29.aspx">https://msdn.microsoft.com/en-us/library/aa767743%28v=vs.85%29.aspx</a><br>
  </body>
</html>