Okay, based on a hint from Navin Pai sent to another list member, I've got
the CE version of WinPCap working. Here is how I did it:
At the top of Packet32.c, add: #include <WINDOWSX.H>
In Packet32.c in the PacketRequest function, there is a reference to
AdapterObject. This needs to be changed to lpAdapter
In Packet32.c in the PacketSetMaxLookahead function, there is a reference to
OidData. This needs to be changed to pOidData
In Packet.h, the following needs to be towards the top of the file (I put it
just before #define SAFE_SET):
#ifdef DRIVER_EXPORTS
#define DRIVER_API __declspec(dllexport)
#else
#define DRIVER_API __declspec(dllimport)
#endif
In Packet.h, the upper edge exported functions need to use DRIVER_API. So
the declarations become:
// Upper edge exported functions
DWORD DRIVER_API PKT_Init(DWORD);
BOOL DRIVER_API PKT_Deinit(DWORD);
DWORD DRIVER_API PKT_Seek(DWORD, LONG, WORD);
DWORD DRIVER_API PKT_Open(DWORD, DWORD, DWORD);
BOOL DRIVER_API PKT_Close(DWORD);
DWORD DRIVER_API PKT_Read(DWORD, LPVOID, DWORD);
DWORD DRIVER_API PKT_Write(DWORD, LPCVOID, DWORD);
BOOL DRIVER_API PKT_IOControl(DWORD, DWORD, PBYTE, DWORD, PBYTE, DWORD,
PDWORD);
VOID DRIVER_API PKT_PowerUp(VOID);
VOID DRIVER_API PKT_PowerDown(VOID);
That's it. Under eMbeddedVisualC++, it compiled and ran on a Compaq IPAQ
running PocketPC 2002 using an NE2000 ethernet card.
Note that I'm not an expert in how this thing works, just how I got it to
compile and run.
-Jim Straus
-----Original Message-----
From: Jim Straus
Sent: Sunday, April 28, 2002 11:53 AM
To: '[EMAIL PROTECTED]'
Subject: [WinPcap-users] Installing Wincap CE
Hello -
I've compiled the CE version of WinPcap successfully (had to make two
small changes in Packet32.c: I changed one reference from Adpater to
lpAdapter and one reference from OidData to pOidData). This is compiled
under embedded VisualC++ with the PocketPC2002 SDK. However, I'm not
installing the DLL's correctly on the PocketPC device (an IPAQ 3835 running
PocketPC2002). Does anyone know the correct registry settings to enable the
NDIS driver (or if I'm doing something else wrong).
Thanks!
-Jim Straus