FIX: Invalid event handle on a Windows Embedded Compact 7-based device

This article describes an issue that occurs when you close a socket in kernel mode in Windows Embedded Compact 7. An update is available to resolve this issue. Before you install this update, all previously issued updates for this product must be installed.


Consider the following scenario:
  • In Windows Embedded Compact 7, you open a socket from a kernel driver and use an asynchronous IO on the socket.
  • You run the WSAEventSelect function together with the FD_CLOSE flag, and then you close the socket by using the closesocket function.
  • You call a WaitForSingleObject function that uses same event handles that are used for the WSAEventSelect function.
In this scenario, the WaitForSingleObject function returns WAIT_FAILED. After the call to the closesocket function, the WSAEnumNetworkEvents and WSAWaitForMultipleEvents functions fail with a WSA_INVALID_HANDLE error.

Note The nonblocking closesocket function initiates graceful socket closure. This process may involve some data exchange. The calling driver must be able to use the WSAWaitForMultipleEvents and WSAEnumNetworkEvents functions in order to wait for graceful socket closure.


Download information

The Windows Embedded Compact 7 Monthly Update(January 2015) is now available from Microsoft. To download this monthly update, go to the following Microsoft Download Center website:

The kind of processor that each file applies to is visible in the name of each file in the "File information" section.

More Information

Restart requirement

After you apply this update, you must perform a clean build of the whole platform. To do this, use one of the following methods:
  • On the Build menu, click Clean Solution, and then click Build Solution.
  • On the Build menu, click Rebuild Solution.
You do not have to restart the computer after you apply this software update.

Update replacement information

This update does not replace any other updates.
File information


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

ID članka: 2983890 - Poslednji pregled: 03.02.2015. - Verzija: 1

Povratne informacije