[Winpcap-users] problem using winpcap 3.1 with windows service
bryan at kadzban.is-a-geek.net
Wed Sep 7 22:18:03 GMT 2005
Michael Ryan wrote:
> I have a service that uses winpcap. The service is set to start
> With winpcap 3.1 Beta 4 the service starts as expected each time the
> computer boots.
> However, with the final version of winpcap 3.1 the service does not
> start automatically with each boot. Interestingly, once the computer
> boots you can start my service manually and it works as expected. It
> just does not start automatically.
> I am not sure what is happening here. One possibility is that winpcap
> is dependent on a third service that has not launched itself when my
> service starts( which is why you can launch my service manually
> after the boot is complete), but there is probably some other reason.
> Any input would be appreciated.
Your service uses winpcap directly, right? It links right to the DLLs,
so that if you open your service's EXE in dependency viewer, you see
wpcap.dll, packet.dll and friends?
I've written a wrapper service around the Windows port of wpa_supplicant
(which uses winpcap), and have run into a few issues with service
dependencies and whatnot with that setup; I would assume the same issues
apply in a case like yours.
What group is your service a member of, if any? (Your service registry
key can have a Group value, a REG_SZ, but it's not required. Group
membership defines which services start first, then dependencies within
and outside those groups.)
Have you tried to set the start type on the "NetGroup Packet Filter"
driver to "automatic" or "system"? What about the "Network Monitor
driver" driver? (On 2K Pro, both are shown if you select "View
nonpresent devices" in device manager, then expand "Non-PnP devices".)
NPF is installed by WinPcap to do the kernel side of packet capturing
over NDIS devices, and NM is installed by Microsoft to do the kernel
side of packet capturing over PPP or VPN connections. WinPcap's DLLs
start NM for sure; I think they also start NPF but I'm not positive on
that. During boot, this service-start takes a LONG time (more than 30
seconds, in the case of NM, which is long enough for the OS to say "this
service isn't responding" and kill the process).
Is there anything in the system log after the machine boots, to the
effect of your service "failed to respond to a start request"? That's
the evidence that the above scenario happened.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://www.winpcap.org/pipermail/winpcap-users/attachments/20050907/29b7f921/signature.pgp
More information about the Winpcap-users