[Winpcap-users] Function RegisterDevice is always returning 0x0 (Win CE 4.2)

Benjamin Gehr benjamin.gehr at esk.fraunhofer.de
Wed Oct 17 16:13:40 GMT 2007


Günther,
I had the same problem and found the solution. I found three reasons for not loading the capture driver:

1. Wrong NDIS Version in PKT_Init() from Packet.c:
My device uses NDIS 4.0. Because of wrong version the NdisRegisterProtocol() cannot register the protocol with the NDIS library. The init function returns 0.
Try changing in line 232 the correct version of your device:
ProtocolChar.MajorNdisVersion = 0x04;

2. Missing Packet.dll: 
The driver must be in system directory "\Windows" and not in the application directory.

3. Driver allready registered: 
If the driver registered once propperly and the application crashes, it does not call DeregisterDevice(). In result the driver is already registered and can't register again. 

I hope this helps.




--
Benjamin Gehr
Fraunhofer-Einrichtung für Systeme der Kommunikationstechnik ESK

Hansastraße 32
80686 München
Telefon:  +49 (0)89/54 70 88-0
Telefax:  +49 (0)89/54 70 88-220
E-Mail:   benjamin.gehr at esk.fraunhofer.de
Internet: http://www.esk.fraunhofer.de



Günther,
altough we had different delvelopers contributing to the Windows CE 
version of WinPcap, none of them gave his availability to support it and 
answer questions on the mailing list. This is the reason why we say on 
the website that we don't provide support for Windows CE, since the rest 
of our team is fully booked on the mainstream NTx WinPcap.

Loris


GüntherLackner wrote:
> Hi!
> 
> I try to use the winpcap windows CE version on an iPaq hx4700 with 
> windows ce 4.2.
> 
> I managed to build all necessary files and copied them to the correct 
> places on the device.
> 
> The problem now is that when I try to run the "SampleApp" the 
> coredll.dll function "RegisterDevice" ...
> 
>  > g_hDev = RegisterDevice (L"PKT", 0, L"PKTdrv.dll", 0x4545); <
> 
> ... never returns an value other than "NULL".
> 
> Could anybody please give me a hint how to solve this problem? Maybe 
> there is a problem with the parameters?
> 
> The Error Message I get from the SampleApp is: "Windows CE failed to 
> load the packet capture driver."
> 
> best regards
> Günther
> 
> -------------------------------------------------------------
> Günther Lackner
> <Guenther.Lackner at iaik.tugraz.at>
> Institute for Applied Information Processing and Communications,
> Graz University of Technology,
> Inffeldg. 16a, 8010 Graz, Austria
> tel: +43 316 873-5501
> fax: +43 316 873-5520
> http://www.iaik.at/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users




More information about the Winpcap-users mailing list