Yup :) I've debugged the pointer to, to make sure there wasn't
something I wasn't catching otherwise. I think I found my problem
though. What if I do not call pcap_open()? For example, if
I don't call that, should I still be calling freealldevs()?<br><br><div><span class="gmail_quote">On 11/16/05, <b class="gmail_sendername">Gianluca Varenni</b> <<a href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><font size="2">Hi.</font></div>
<div><font size="2"></font> </div>
<div><font size="2">Did you also check that you aren't calling CDevice::Cleanup
multiple times on the same "devs" pointer (thus trying to free the adapters list
multiple times)?</font></div>
<div><font size="2"></font> </div>
<div><font size="2">Have a nice day</font></div>
<div><font size="2">GV</font></div>
<div> </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><div><span class="e" id="q_10799f09b5527f6a_1">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="nightskywriter@gmail.com" href="mailto:nightskywriter@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Eric
Hansen</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="winpcap-users@winpcap.org" href="mailto:winpcap-users@winpcap.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
WinPCap Mailing List</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Sunday, November 13, 2005 4:04
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [Winpcap-users]
pcap_freealldevs() causing program crash.</div>
<div><br></div>Does anyone know why, whenever I put in
"pcap_freealldevs(devs);" into my cleanup code (that frees all the memory,
etc...that my program uses), it always crashes?<br><br>devs
declaration:<br>pcap_if_t *devs, *d; // Device list<br><br>My cleanup
code:<br>void CDevice::Cleanup(){<br><br> // Free the device
list<br> pcap_freealldevs(devs);<br>}<br><br>and how I'm
using devs:<br>void CDevice::Devices(){<br>
if(pcap_findalldevs(&devs, error) == -1){<br>
AfxMessageBox(error);<br> }
else{<br> for(iCount = 0, d = devs; d !=
NULL; d = d->next, iCount++){<br>
if(d->description){<br>
cDescription[iCount]
= d->description;<br>
}<br><br>
cDevice[iCount] = d->name;<br>
}<br>
}<br>}<br><br>I've been racking my brain for over an hour
trying to figure out what I'm doing.<br><br>(Note: I call Cleanup() in the
WM_DESTROY Windows message)<br>
</span></div><p>
</p><hr>
<p></p>_______________________________________________<br>Winpcap-users
mailing
list<br><a href="mailto:Winpcap-users@winpcap.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Winpcap-users@winpcap.org</a><br><a href="https://www.winpcap.org/mailman/listinfo/winpcap-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br><p></p></blockquote>
<br>_______________________________________________<br>Winpcap-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://www.winpcap.org/mailman/listinfo/winpcap-users" target="_blank">
https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://tenshi.honeyblade.net">http://tenshi.honeyblade.net</a> (my poetry)<br><br>"You wanted this ending to happen...ROMANTISUTO!"