<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I think the idea is to <br>
a) copy the string for(i = 0 ; etc)<br>
b) call freealldevs()<br>
If you try to access the pointer d-&gt;name after the call to
freealldevs() bad things *will* happen. Not sure if that is what you
are doing<br>
<br>
Have a very nice day.<br>
\t<br>
<br>
Eric Hansen wrote:
<blockquote
 cite="mid3d162ead0511161153m1c071ab3ie130d05e0929dd91@mail.gmail.com"
 type="cite">
  <meta http-equiv="Context-Type"
 content="text/html; charset=ISO-8859-1">
Yup.&nbsp; What I do, is store the info like so:<br>
  <br>
cDevice[iCount] = d-&gt;name;<br>
  <br>
Then, when I goto list the info, I do this:<br>
  <br>
for(i = 0; i &lt; iCount; i++){<br>
m_devices.AddString(cDevice[i]);<br>
}<br>
  <br>
(m_devices is a ListBox)<br>
  <br>
  <div><span>On 11/16/05, <b>Gianluca Varenni</b> &lt;<a
 href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</a>&gt;
wrote:</span>
  <blockquote>
    <div> Maybe it's an obvious question: are you actually *copying"
the strings in pcap_if_t* (e.g. pcap_if_t::name and
pcap_if_t::description)? </div>
    <span>
    <div> &nbsp;</div>
    <div> Have a nice day </div>
    <div> GV </div>
    <div>&nbsp;</div>
    <div> &nbsp;</div>
    <div> &nbsp;</div>
    <div> &nbsp;</div>
    </span>
    <blockquote><span>
      <div>----- Original Message ----- </div>
      <div><b>From:</b> <a title="nightskywriter@gmail.com"
 href="mailto:nightskywriter@gmail.com">Eric Hansen</a> </div>
      <div><b>To:</b> <a title="winpcap-users@winpcap.org"
 href="mailto:winpcap-users@winpcap.org">
winpcap-users@winpcap.org</a> </div>
      </span><span>
      <div><b>Sent:</b> Wednesday, November 16, 2005 11:12 AM</div>
      <div><b>Subject:</b> Re: [Winpcap-users] pcap_freealldevs()
causing program crash.</div>
      <div><br>
      </div>
      </span>
      <div><span>No, what I have so far is just all the information
stored in arrays, and I display that info. after calling freealldevs();<br>
      <br>
MqX: Thanks, but it's still causing me trouble (I really appreciate it
though).<br>
      <br>
      <div><span>On 11/16/05, <b>Guy Harris</b> &lt;<a
 href="mailto:guy@alum.mit.edu+">guy@alum.mit.edu </a>&gt; wrote:</span>
      <blockquote>Eric Hansen wrote:<br>
&gt; Well, I got my program to not crash (I put the freealldevs() at
the very <br>
&gt; end of my init function).&nbsp;&nbsp;But, now, the device names are
"encrypted"<br>
&gt; (they show up in weird characters now, unlike before when they
showed up<br>
&gt; like they should).<br>
        <br>
You're not referring to the devices after the pcap_freealldevs() call, <br>
right?<br>
_______________________________________________<br>
Winpcap-users mailing list<br>
        <a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br>
        <a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br>
      </blockquote>
      </div>
      <br>
      <br>
      <br>
-- <br>
      <a href="http://tenshi.honeyblade.net">http://tenshi.honeyblade.net</a>
(my poetry)<br>
      <br>
"You wanted this ending to happen...ROMANTISUTO!" </span></div>
      <p> </p>
      <span> _______________________________________________<br>
Winpcap-users mailing list<br>
      <a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br>
      <a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br>
      </span></blockquote>
    <br>
_______________________________________________<br>
Winpcap-users mailing list<br>
    <a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br>
    <a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br>
    <br>
    <br>
  </blockquote>
  </div>
  <br>
  <br>
  <br>
-- <br>
  <a href="http://tenshi.honeyblade.net">http://tenshi.honeyblade.net</a>
(my poetry)<br>
  <br>
"You wanted this ending to happen...ROMANTISUTO!"
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Winpcap-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a>
<a class="moz-txt-link-freetext" href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>