Microsoft KB Archive/266241

{|
 * width="100%"|

BUG: Error 14007 When You Create a Socket Using AF_IRDA

 * }

Q266241

-

The information in this article applies to:


 * Microsoft Windows CE Platform SDK for Handheld PC, version 3.0
 * Microsoft Windows CE Platform SDK for Palm-size PC, version 1.2
 * Microsoft Windows CE Platform Builder, versions 2.11, 2.12

-

SYMPTOMS
When you call the Socket function and specify AF_IRDA as the address family, the function fails, and the WSAGetLastError function returns 14007 (WSAEAFNOSUPPORT - The specified address family is not supported).

This error occurs only for platforms that are built using Windows CE versions 2.11 and 2.12.

CAUSE
A bug in the Microsoft Foundation Classes (MFC) headers incorrectly defines _WIN32_WINDOWS, which causes AF_IRDA to be defined as the desktop IrDA address family constant.

RESOLUTION
To resolve this problem, do the following:


 * 1) Locate the Afxv_w32.h file in the Mfc\Include folder for the platform to be targeted.
 * 2) Locate the following line in the file:
 * 3) Modify this line to read as follows:

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

MORE INFORMATION
This error occurs only with Platform Software Development Kits (SDKs) for platforms that are built using Windows CE versions 2.11 and 2.12. The only retail targeted platforms that are affected by this problem are the Handheld PC Professional 3.0, and the Palm-size PC 1.2. In addition, any SDKs that are exported from Windows CE Platform Builder versions 2.11 or 2.12 will exhibit this problem.

Additional query words: WinSock

Keywords : kbMFC kbWinsock kbOSWinCE211 _IK kbGrpDSETK kbOSWinCE212

Issue type : kbbug

Technology : kbAudDeveloper kbSDKSearch kbWinCESDKSearch kbWinCESearch kbWinCESDK211 kbWinCESDK212 kbWinCESDK300HPC kbWinCESDK120PalmsizePC