Hello, thank you for your help !!... but :<br><br><div><span class="gmail_quote">2007/3/13, Gianluca Varenni &lt;<a href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>----- Original Message -----<br>From: &quot;Samuel Voiron&quot; &lt;<a href="mailto:samuelvoiron@gmail.com">samuelvoiron@gmail.com</a>&gt;<br><br>&gt; Hello,<br>&gt;<br>&gt; I&#39;m trying to use the Winpcap library to develop a sniffer
<br>&gt; application. I am at the step of getting familiar with the basic<br>&gt; functions of the API.<br>&gt; I got successful running the few first examples given in the tutorial<br>&gt; on LINUX (actually using libcap so, out of topic, sorry) but I am
<br>&gt; really struggling to have it work on WINDOWS.<br>&gt; I red pretty much all I found about my problem and still can&#39;t find a<br>&gt; way to sort it out.<br>&gt;<br>&gt; I&#39;m using VisualC++2005Express and try to run this example :
<br>&gt; <a href="http://www.winpcap.org/docs/docs_40/html/group__wpcap__tut1.html">http://www.winpcap.org/docs/docs_40/html/group__wpcap__tut1.html</a>&gt;<br>&gt; It compiles but I have this errors at the execution :<br>
&gt;<br>&gt; main.obj : error LNK2019: unresolved external symbol _pcap_freealldevs<br>&gt; referenced in the function _main<br>&gt; main.obj : error LNK2019: unresolved external symbol<br>&gt; _pcap_findalldevs_ex referenced in the function _main
<br><br>You need to add wpcap.lib in the additional lib dependencies of your project<br>(it&#39;s one of the linker properties). wpcap.lib is available in the lib<br>folder of the developer&#39;s pack.</blockquote><div><br>
I have of course already done that ... as soon as I read about it on this mailing list.<br>Here&#39;s exactly what I did :<br>In the Tools/Option menu, on the left, I chosse &quot;Projects and Solutions&quot; (sorry my Visual is in french so I merely translate) and &quot;VC++ Directories&quot;. In the &quot;Display Directories for&quot; menu on the upper-right, I choose &quot;Include Files&quot; and add a new line by selecting the Include directory of the WinPcap Pack directory. I then do the same for &quot;Librairy files&quot; in the upper-right menu, selecting the WinPcap/Lib directory and adding it in a new line.
<br><br>All this is a configuration that will affect all the projects I&#39;ll work on with VC++. I also change just one thing in the &quot;Project/Properties&quot; menu about the preprocessing values. On the the left of this box, I go in &quot;Configuration Properties -&gt; C/C++ -&gt; Preprocessor&quot; and on the right, in &quot;Preprocessor Definition&quot;, where there already is &quot;WIN32;_DEBUG;_CONSOLE&quot; I add &quot;;WPCAP;HAVE_REMOTE&quot;.
<br><br>Done !! At least that&#39;s what I thought...<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt;<br>&gt; I have seen that several people from the mailing list had similar
<br>&gt; problems and they seem to have been able to solve it by including lib,<br>&gt; dll, etc.. files. I included all I could, even downloading wpcap.dll,<br>&gt; which was not included in the winpcap development kit and putting it
<br>&gt; in the Wpcap directory, trying with a coppy in c:/windows/system32,<br><br>wpcap.dll is installed by the WinPcap installer. You always need to install<br>WinPcap, the devpack doesn&#39;t include it.</blockquote><div>
<br>Actually, I found the dll&#39;s (packet.dll and wpcap.dll) on my hard drive.I think they come from the installation of wireshark, which includes these.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; ...<br>&gt;<br>&gt; I read about including WPCAP and HAVE_REMOTE in the preprocessor<br>&gt; definitions and did it.<br>&gt;<br>&gt; The error mentioned above still comes up.<br>&gt;<br>&gt; I thought about actually compiling the entire winpcap driver but found
<br><br>You do not need to compile the driver to develop a WinPcap based<br>application. You need<br><br>- WinPcap installed on your machine<br>- the developer&#39;s pack<br>- either Microsoft Visual Studio or cygwin</blockquote>
<div><br>That&#39;s what I thought =) <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hope it helps<br>GV</blockquote><div><br>
Not quite yet ... but many thanks !!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =)<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; that I should use a windows driver development kit, which is a 
2.4GB<br>&gt; iso to download... (sic)<br>&gt; I don&#39;t think I have to do this and should be able to get my programs<br>&gt; work with just the winpcap API.<br>&gt;<br>&gt; I may have omitted one very simple trick... in that case, I&#39;m sorry
<br>&gt; about it but please, help me out.<br>&gt;<br>&gt; Thanks a lot,<br>&gt; Samuel<br>&gt; _______________________________________________<br>&gt; Winpcap-users mailing list<br>&gt; <a href="mailto:Winpcap-users@winpcap.org">
Winpcap-users@winpcap.org</a><br>&gt; <a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br><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>