<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="chmetcnv"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:14.5pt;
        font-family:SimSun;}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
span.comment
        {color:maroon;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</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]-->
</head>

<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=Section1 style='layout-grid:15.6pt'>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size:
9.0pt;font-family:Arial'>Hi:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:18.0pt'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>I&#8217;m developing
USB-NIC driver , I want to control my hardware(cypress usb controller CY68013
and <st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False"
SourceValue="3" UnitName="g" w:st="on">3G</st1:chmetcnv>&nbsp; IC) via winpcap,
and I met a problem;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:18.0pt'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>I want to read a register
of <st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False"
SourceValue="3" UnitName="g" w:st="on">3G</st1:chmetcnv> IC, so in MyRead()
function, I open a device , and start the capture by calling <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:36.0pt'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>pcap_loop(adhandle,0,packet_handler,NULL),<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:13.5pt'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>&nbsp;then, I call <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:36.0pt'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>pcap_sendpacket()<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:13.5pt'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>&nbsp;to send a command to
my usb device so it will read register of <st1:chmetcnv TCSC="0" NumberType="1"
Negative="False" HasSpace="False" SourceValue="3" UnitName="g" w:st="on">3G</st1:chmetcnv>
IC via i<st1:chmetcnv TCSC="0" NumberType="1" Negative="False" HasSpace="False"
SourceValue="2" UnitName="C" w:st="on">2c</st1:chmetcnv> bus and reply the data
to PC witch I want to captured in packet_handler, the sending is ok,<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:13.5pt'><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'>but when MyRead() function
return, IndexOutOfRangeException&nbsp; happened, can you tell me why?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size:
9.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size:
9.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>