<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>Hi</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>Sorry - my sample app depends on way too much for me to
quickly zip it up and post it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>I'm using 3.1. I will try 4.0 and let you know
what happens.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>I'm using Visual C++ 2005 Express. I will try Visual Studio
2003 for size too.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>Some more information that may be of interest.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>My service is compiled as a console application. When
running it (in debug mode) as a console app and not a service, pcap_findalldevs
is successful only if run from the main thread. pcap_loop can be run from the
new thread no problem. When I do the same thing in a windowed application
I can call pcap_findalldevs from the new thread without issue.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>It really smacks of a thread permissions issue. I've tried
making sure the apps and services are running as admin (because of npf and nm),
but that does not seem to help. Right now I'm trying to find out what the
difference is between a console thread and a Window thread.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006></SPAN><SPAN
class=843434807-10082006></SPAN><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>Regards</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843434807-10082006><FONT face=Arial
color=#0000ff size=2>RichardB</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> winpcap-users-bounces@winpcap.org
[mailto:winpcap-users-bounces@winpcap.org] <B>On Behalf Of </B>Gianluca
Varenni<BR><B>Sent:</B> 09 August 2006 19:15<BR><B>To:</B>
winpcap-users@winpcap.org<BR><B>Subject:</B> Re: [Winpcap-users]
pcap_findalldevs Hangs when called in Windowsservice<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT size=2>Richard,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>can you please provide a sample app showing the
problem?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Which version of WinPcap are you using? WinPcap 3.1 has a
known bug that affects services based on WinPcap, bug that has been fixed in the
newer versions of WinPcap like 4.0alpha1.</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>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=RichardB@thoroughtec.com
href="mailto:RichardB@thoroughtec.com">Richard Bellengere</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, August 08, 2006 5:44
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] pcap_findalldevs
Hangs when called in Windows service</DIV>
<DIV><BR></DIV>
<DIV>
<DIV></DIV>
<DIV><SPAN class=296015106-08082006><FONT face=Arial
size=2>Hi.</FONT></SPAN></DIV>
<DIV><SPAN class=296015106-08082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=296015106-08082006><FONT face=Arial size=2>I'm getting
exactly the same thing. Did you ever get a solution to this
problem?</FONT></SPAN></DIV>
<DIV><SPAN class=296015106-08082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=296015106-08082006><FONT face=Arial size=2>It seems to have
something to do with findalldevs being called from a new thread and not the
process's main thread.</FONT></SPAN></DIV>
<DIV><SPAN class=296015106-08082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=296015106-08082006><FONT face=Arial
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=296015106-08082006><FONT face=Arial
size=2>RichardB</FONT></SPAN></DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<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></BODY></HTML>