[Winpcap-users] problem using winpcap 3.1 with windows service

Bryan Kadzban bryan at kadzban.is-a-geek.net
Thu Sep 8 21:43:41 GMT 2005


Michael Ryan wrote:
> First, Bryan and Arno, thanks for the suggestions and help. My 
> service does link directly to the wcap.dll, and it is not part of a 
> group.
> 
> In the scenario described below and by Bryan earlier, is there any 
> way my service can depend on NPF directly and avoid the middle 
> service?

In your service's registry key, add a REG_MULTI_SZ named
"DependOnServices" (or possibly "DependOnService"; I don't remember for
sure, so check out some of the other service keys on your machine and
use whatever value-name they use).  You'll have to use regedt32 if you
do this on a 2K Pro box, but XP's regedit can handle it just fine.

The data is a list of service names ( == names of registry keys) that
your service should depend on.  Add "NM" and "NPF" to this list (the
names are case-insensitive), because those are the registry keys for the
"Network Monitor driver" driver and the "Netgroup Packet Filter" driver.

You'll need both, because wpcap.dll links against packet.dll, which
links against wanpacket.dll, which calls LoadLibrary on the Netmon
client DLL, which tries to start the "nm" driver if it isn't already
running.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://www.winpcap.org/pipermail/winpcap-users/attachments/20050908/311e0c71/signature-0001.pgp


More information about the Winpcap-users mailing list