Hi,
I am playing with code to use IrDA between my PocketPC (WinCE 2002) and two
desktop PC's, one with Win2000 the other with Win98se. I am using WinSock.
The code is working fine (full two way communication) for
PocketPC-PocketPC Client/Server
PocketPC-Win2000 Client/Server
Win2000-PocketPC Client/Server
Under Win98se the WSAStartup is OK returning "WinSock 2.0"
but then the initial call to "socket" fail with
"Address family not supported by protocol family"
Now with the IrDA socket call, the "protocol" is set as NULL,
so the problem must be with the "Address family"
which is defined in AF_IRDA.H as
either 26 (WinNT and WinWindows)
or 22 (WCE):-
#define WINDOWS_AF_IRDA 26
#define WINDOWS_PF_IRDA WINDOWS_AF_IRDA
#define WCE_AF_IRDA 22
#define WCE_PF_IRDA WCE_AF_IRDA
#if defined(_WIN32_WINNT) || defined(_WIN32_WINDOWS)
#define AF_IRDA WINDOWS_AF_IRDA
#define IRDA_PROTO_SOCK_STREAM 1
#elif defined(_WIN32_WCE)
#define AF_IRDA WCE_AF_IRDA
#else
#pragma message("One of _WIN32_WINNT | _WIN32_WINDOWS | _WIN32_WCE must be
defined.")
#endif
However the ONLY value the "socket" open succeeds with on my Win98 PC is
AF_INET:-
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
Using AF_INET on the Win98se PC as a client, the GetSockopt fails with
"Invalid argument"
(According to the results of GetSockopt, the PocketPC acting as a client,
can "see" the IrDA port on the Win98se PC. This suggests a software fault
rather than hardware.)
Anybody have any suggestions what I need to do to allow Win98se to work
compared to Win2000?
Thanks
Ray Cannon