PRB: Winsock 2.0 Test Case 101 in the Windows CE Test Kit Does Not Succeed (816439)



The information in this article applies to:

  • Microsoft Windows CE .NET Operating System 4.1

SYMPTOMS

The Winsock 2.0 test case 101 that is included with the Microsoft Windows CE .NET Test Kit (CETK) may stop responding, and you may receive the following error message:

10014 (WSAEFAULT)

CAUSE

This problem occurs because the test case calls the recvfrom() function and passes an uninitialized buffer size parameter.

RESOLUTION

To resolve this problem, add the following code to the Transfer.cpp source file.

Insert the code in the TransferTest() function, before the first use of the cbRemoteAddr variable:
cbRemoteAddr = sizeof(ssRemoteAddr);
For more information about rebuilding the test to incorporate the fixed source, see the "More Information" section.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

To implement the resolution to this problem (as described in the "Resolution" section), you must download and install a header file. The following file is available for download from the Microsoft Download Center:
DownloadDownload the Katoex.exe package now. For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. Note This article uses several of the path environment variables that are defined in the Windows CE build environment.

To see how these variables are defined, follow these steps in Platform Builder:
  1. Open the build release directory.
  2. At the command prompt that appears, type set.
When you install the CETK source, it is saved in the following location:

%_WINCEROOT%\Others\Wcetk

where %_WINCEROOT% is the build environment variable that stores the installation location for Microsoft Windows CE.

The Winsock 2.0 test source is located in the following directory:

%_WINCEROOT%\Others\Wcetk\Source\Ws2bvt

After you modify the test code, you must follow these steps to rebuild and to use the updated test:
  1. Add the Katoex.exe header file. Download the Katoex.exe file that is provided earlier in this article, and then save it in the following location:

    %_WINCEROOT%\Others\Wcetk\Tux\Inc

  2. Change the Ws2bvt source file in two places:
    1. Add the following below the TARGETTYPE definition:
      INCLUDES=..\..\tux\inc
    2. Change the reference to Kato.lib in the second TARGETLIBS definition to read as follows:
      ..\..\tux\lib\$(_CPUINDPATH)\kato.lib
  3. Build the Ws2bvt test:
    1. In Platform Builder, open the platform where you will be running the test.
    2. On the Build menu, click Open Build Release Directory.
    3. In the resulting console window, change to the following directory:

      %_WINCEROOT%\Others\Wcetk\Source\Ws2bvt

    4. Type build -c, and then press ENTER.
  4. Make the new .dll file available to the test kit.
  5. After the build of the test is complete, run the following commands at a command prompt (where cpu is the CPU of your platform, for example, x86).:
    1. cd %CEPBDir%\cepb\wcetk\ddtk\cpu
    2. ren ws2bvt.dll ws2bvt.bak
    3. xcopy /v %_PROJECTOAKROOT%\target\cpu\retail\ws2bvt.dll

Modification Type:MinorLast Reviewed:8/4/2004
Keywords:kbdownload kbprb kbfile kbbug KB816439 kbAudDeveloper kbAudOEM