FIX: The SCardListReaders function may not correctly work when used in an RDP session in Windows CE .NET 4.0 (888087)



The information in this article applies to:

  • Microsoft Windows CE .NET 4.0

SYMPTOMS

When you run a Remote Desktop Protocol (RDP) session, and the server-side software calls the SCardListReaders function, a problem may occur if the following conditions are true:
  • The mszReaders parameter is set to NULL. The mszReaders parameter is the third parameter.
  • The pcchReaders parameter points to a DWORD that contains a large value. The pcchReaders parameter is the fourth parameter.
The SCardListReaders function may fail, and you may receive the following error message:
SCARD_E_NO_MEMORY
This is an unexpected problem. The current value for the DWORD variable that is pointed to by the pcchReaders parameter is supposed to be ignored if the mszReaders parameter is set to NULL.

RESOLUTION

Software update information

A supported software update is now available from Microsoft as Windows CE 4.0 Core OS QFE 888087. To resolve this problem immediately, click the following article number for information about obtaining Windows CE Platform Builder and core operating system software updates:

837392 How to locate core operating system fixes for Microsoft Windows CE Platform Builder products

Prerequisites

This update is supported only if all previously issued updates for this product have also been installed.

Restart requirement

After you install this update, you must perform a clean build of the whole platform. To clean the platform, click Clean on the Build menu. To build the platform, click Build Platform on the Build menu. You do not have to restart your computer after you apply this update.

Update replacement information

This update does not replace any other updates.

File information

The English version of this package has the file attributes (or later) that are listed in the following table.
   Date         Time   Version            Size    File name
   --------------------------------------------------------------
   06-Nov-2004  00:46  4.00            6,675,192  Wincepb40-041105-kb888087-armv4.exe  
   06-Nov-2004  00:51  4.00            6,675,192  Wincepb40-041105-kb888087-armv4i.exe
   06-Nov-2004  00:47  4.00            6,650,616  Wincepb40-041105-kb888087-armv4t.exe
   06-Nov-2004  00:47  4.00            6,277,880  Wincepb40-041105-kb888087-mips16.exe
   06-Nov-2004  00:47  4.00            6,806,264  Wincepb40-041105-kb888087-mipsii.exe
   06-Nov-2004  00:47  4.00            6,834,936  Wincepb40-041105-kb888087-mipsii_fp.exe
   06-Nov-2004  00:51  4.00            6,974,200  Wincepb40-041105-kb888087-mipsiv.exe
   06-Nov-2004  00:47  4.00            6,990,584  Wincepb40-041105-kb888087-mipsiv_fp.exe
   06-Nov-2004  00:46  4.00            6,384,376  Wincepb40-041105-kb888087-sh3.exe
   06-Nov-2004  00:50  4.00            6,384,376  Wincepb40-041105-kb888087-sh4.exe
   06-Nov-2004  00:50  4.00            5,769,976  Wincepb40-041105-kb888087-x86.exe
The English version of this update has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time                      Size    File name
   --------------------------------------------------------------

   Path: Public\Rdp\Oak\Lib\Armv4\Debug
   02-Nov-2004  02:50                 12,959,470  Mstscax.lib
   02-Nov-2004  02:50                    356,352  Mstscax.pdb
   02-Nov-2004  02:50                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Armv4\Retail
   02-Nov-2004  02:46                  7,543,210  Mstscax.lib
   02-Nov-2004  02:46                    339,968  Mstscax.pdb
   02-Nov-2004  02:46                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Armv4i\Debug
   02-Nov-2004  03:07                 12,980,656  Mstscax.lib
   02-Nov-2004  03:07                    356,352  Mstscax.pdb
   02-Nov-2004  03:07                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Armv4i\Retail
   02-Nov-2004  03:03                  7,559,844  Mstscax.lib
   02-Nov-2004  03:03                    339,968  Mstscax.pdb
   02-Nov-2004  03:03                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Armv4t\Debug
   02-Nov-2004  02:59                 12,347,864  Mstscax.lib
   02-Nov-2004  02:59                    356,352  Mstscax.pdb
   02-Nov-2004  02:58                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Armv4t\Retail
   02-Nov-2004  02:55                  7,523,054  Mstscax.lib
   02-Nov-2004  02:55                    339,968  Mstscax.pdb
   02-Nov-2004  02:54                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mips16\Debug
   02-Nov-2004  03:33                 12,261,372  Mstscax.lib
   02-Nov-2004  03:33                    356,352  Mstscax.pdb
   02-Nov-2004  03:32                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mips16\Retail
   02-Nov-2004  03:29                  7,126,936  Mstscax.lib
   02-Nov-2004  03:29                    339,968  Mstscax.pdb
   02-Nov-2004  03:28                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mipsii\Debug
   02-Nov-2004  03:16                 13,464,132  Mstscax.lib
   02-Nov-2004  03:16                    356,352  Mstscax.pdb
   02-Nov-2004  03:15                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mipsii\Retail
   02-Nov-2004  03:12                  7,959,918  Mstscax.lib
   02-Nov-2004  03:12                    339,968  Mstscax.pdb
   02-Nov-2004  03:11                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mipsii_fp\Debug
   02-Nov-2004  03:42                 13,480,130  Mstscax.lib
   02-Nov-2004  03:42                    364,544  Mstscax.pdb
   02-Nov-2004  03:41                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mipsii_fp\Retail
   02-Nov-2004  03:37                  7,975,124  Mstscax.lib
   02-Nov-2004  03:37                    339,968  Mstscax.pdb
   02-Nov-2004  03:37                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mipsiv\Debug
   02-Nov-2004  03:25                 13,692,678  Mstscax.lib
   02-Nov-2004  03:24                    356,352  Mstscax.pdb
   02-Nov-2004  03:24                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mipsiv\Retail
   02-Nov-2004  03:20                  8,135,666  Mstscax.lib
   02-Nov-2004  03:20                    339,968  Mstscax.pdb
   02-Nov-2004  03:20                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mipsiv_fp\Debug
   02-Nov-2004  03:50                 13,711,020  Mstscax.lib
   02-Nov-2004  03:50                    364,544  Mstscax.pdb
   02-Nov-2004  03:49                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Mipsiv_fp\Retail
   02-Nov-2004  03:46                  8,151,084  Mstscax.lib
   02-Nov-2004  03:46                    339,968  Mstscax.pdb
   02-Nov-2004  03:45                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Sh3\Debug
   02-Nov-2004  02:33                 11,720,534  Mstscax.lib
   02-Nov-2004  02:33                    356,352  Mstscax.pdb
   02-Nov-2004  02:33                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Sh3\Retail
   02-Nov-2004  02:29                  7,083,148  Mstscax.lib
   02-Nov-2004  02:29                    339,968  Mstscax.pdb
   02-Nov-2004  02:29                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Sh4\Debug
   02-Nov-2004  02:42                 11,721,344  Mstscax.lib
   02-Nov-2004  02:42                    356,352  Mstscax.pdb
   02-Nov-2004  02:41                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\Sh4\Retail
   02-Nov-2004  02:38                  7,073,840  Mstscax.lib
   02-Nov-2004  02:38                    339,968  Mstscax.pdb
   02-Nov-2004  02:37                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\X86\Debug
   02-Nov-2004  02:25                 11,052,970  Mstscax.lib
   02-Nov-2004  02:25                    356,352  Mstscax.pdb
   02-Nov-2004  02:24                    217,088  Rdpdr.pdb

   Path: Public\Rdp\Oak\Lib\X86\Retail
   02-Nov-2004  02:21                  6,624,648  Mstscax.lib
   02-Nov-2004  02:21                    339,968  Mstscax.pdb
   02-Nov-2004  02:21                    217,088  Rdpdr.pdb

MORE INFORMATION

You want to use NULL for the mszReaders parameter that is the third parameter. You do this so that you can query for the size that is required for the buffer. The size that is required for the buffer has to be allocated before you allocate the buffer and then make another call to the SCardListReaders function.

WORKAROUND

Because the technique that is mentioned in the "More Information" section may fail, the alternative is to set the pcchReaders parameter to the SCARD_AUTOALLOCATE length designator. This makes the SCardListReaders function allocate a buffer that is the correct size and then return the requested list of readers.

STATUS

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

Modification Type:MinorLast Reviewed:5/27/2005
Keywords:kbBug kbfix kbQFE KB888087 kbAudDeveloper