I don't know about your first issue, because I simply
loop calling PacketReceivePacket( ) and check the
pkt.ulBytesReceived member to see if it is non-zero.

I was able to successfully send a packet using
PacketSendPacket( ) on Pocket PC 2002 using a Symbol
Spectrum 24 wireless LAN card on a Toshiba e570.  The
code fragments are as follows:

PACKET pkt;
::ZeroMemory( &pkt, sizeof( pkt ) );

// Prepare buffer containing Ethernet frame here...
In my case it goes into a variable named "mas"

// Prepare packet for driver.
PVOID pbyBuf = (PVOID) &mas;
::PacketInitPacket( &pkt, pbyBuf, sizeof( mas ) );

// Send only 1 copy (although it appears WinPcap sends
2 nonetheless).
::PacketSetNumWrites( m_pAdapter, 1 );

// Transmit the packet.
::PacketSendPacket( m_pAdapter, &pkt, TRUE );

This seems to work for me.  One thing I do, however,
is execute this code on the same thread that does the
listening (i.e., the one that calls
PacketReceivePacket( )).  That way I won't be trying
to write and read data from the driver simultaneously.

Joe

--- Carlos Calafate <[EMAIL PROTECTED]> wrote:
> Hi!
> 
> I have been doing some experiments with PacketCE on
> a iPaq 3850 and I have
> noticed two problems:
> 
> - first, it seems like it returns packets with size
> 0, even though I tell it
> to wait forever for a valid packet. I have
> encountered a way to work around
> this problem, but it exists!
> 
> - second, PacketSendPacket doesn't seem to work
> properly. I'm using a Lucent
> 802.11 Wavelan/IEEE to test, and it works fine under
> W2k/Linux, but on the
> iPaq it seems to block execution of the program and
> does not send anything.
> It works sometimes,
> though, but I don't know why since I don't make any
> change!!!
> If anyone was able to use PacketSendPacket
> successfully, please tell me how.
> 
> Sincerely
> 
> Carlos Calafate
> UPV, Valencia, Spain
> 
> 
> 
>
______________________________________________________________________________
> mensaje enviado desde http://www.iespana.es
> emails (pop)-paginas web (espacio
> ilimitado)-agenda-favoritos (bookmarks)-foros -Chat
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

Reply via email to