<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 17/08/2019 à 15:00, James Richters a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:225c01d554fb$cb426bf0$61c743d0$@productionautomation.net">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1"><span style="color:windowtext"><o:p></o:p></span>
        <p class="MsoNormal"><span style="color:windowtext">Function
            TLibUsbInterface.FindEndpoint(MatchFunc :
            TLibUsbEndpointMatchMethod) : Plibusb_endpoint_descriptor;<o:p></o:p></span></p>
        <span style="color:windowtext">MatchFunc(ED) is where the access
          violation occurs, but I can’t trace any further because I
          can’t find the function MatchFunc()   I just don’t understand
          where the actual function is.<o:p></o:p></span><span
          style="color:windowtext"><o:p></o:p></span><span
          style="color:windowtext"><o:p> </o:p></span><span
          style="color:windowtext"></span></div>
    </blockquote>
    <p><span style="color:windowtext">MatchFunc is a parameter (its type
        is </span><span style="color:windowtext"><span
          style="color:windowtext">TLibUsbEndpointMatchMethod</span>) of
      </span><span style="color:windowtext"><span
          style="color:windowtext">TLibUsbInterface.FindEndpoint.</span></span></p>
    <p><span style="color:windowtext"><span style="color:windowtext">To
          find which function is actually called, you should trace back
          where </span></span><span style="color:windowtext"><span
          style="color:windowtext"><span style="color:windowtext">TLibUsbInterface.FindEndpoint
            is called and what function is provided as parameter
            MatchFunc.</span></span></span></p>
    <p><span style="color:windowtext"><span style="color:windowtext"><span
            style="color:windowtext">It's likely you'll have to "climb
            up" through several calls, may be that </span></span></span><span
        style="color:windowtext"><span style="color:windowtext"><span
            style="color:windowtext"><span style="color:windowtext"><span
                style="color:windowtext"><span style="color:windowtext">TLibUsbInterface.FindEndpoint
                  has itself a parameter </span></span></span></span></span></span><span
        style="color:windowtext"><span style="color:windowtext"><span
            style="color:windowtext"><span style="color:windowtext"><span
                style="color:windowtext"><span style="color:windowtext"><span
                    style="color:windowtext">MatchFunc</span></span></span></span></span></span></span></p>
    <p><span style="color:windowtext"><span style="color:windowtext"><span
            style="color:windowtext"><span style="color:windowtext"><span
                style="color:windowtext"><span style="color:windowtext"><span
                    style="color:windowtext">If you use the debugger,
                    the callstack and a breakpoint just before the
                    offending call to </span></span></span></span></span></span></span><span
        style="color:windowtext"><span style="color:windowtext"><span
            style="color:windowtext"><span style="color:windowtext"><span
                style="color:windowtext"><span style="color:windowtext"><span
                    style="color:windowtext"><span
                      style="color:windowtext"><span
                        style="color:windowtext"><span
                          style="color:windowtext"><span
                            style="color:windowtext"><span
                              style="color:windowtext"><span
                                style="color:windowtext"><span
                                  style="color:windowtext">MatchFunc</span></span></span></span></span></span></span>
                    should help you to find from where comes your
                    MatchFunc.</span></span></span></span></span></span></span></p>
    <p><span style="color:windowtext"><span style="color:windowtext"><span
            style="color:windowtext"><span style="color:windowtext"><span
                style="color:windowtext"><span style="color:windowtext"><span
                    style="color:windowtext">I wouldn't be surprised
                    that it resolves somewhere to an overridden method
                    Match of an instance of a class derived from
                    TLibUsbDeviceMatchClass, likely
                    TLibUsbDeviceMatchVidPid.Match,
                    TLibUsbDeviceMatchVidPidSerial.Match or
                    TLibUsbInterfaceMatchNumAlt.Match from unit
                    libusbutil.pas</span></span></span></span></span></span></span></p>
    <p><span style="color:windowtext"><span style="color:windowtext"><span
            style="color:windowtext"><span style="color:windowtext"><span
                style="color:windowtext"><span style="color:windowtext"><span
                    style="color:windowtext">This can sound difficult 
                    for you at the beginning if you're not too much
                    accustomed with variables of type procedure and
                    inheritance, but after a few practice it's not that
                    complicated.<br>
                  </span></span></span></span></span></span></span></p>
  </body>
</html>