According to http://www.vttoth.com/wow32.htm, this error messages occurs when GDI returns a handle higher than 16383 for a call made on behalf of a 16-bit Windows program. The handles could go up to 65535, but evidently they get right-left-shifted by 2 bits before being returned to the 16-bit app for some reason (presumably compatibility with something).
Before Windows XP, this couldn't happen, as only 16384 GDI objects were allowed to exist in any given session, but with XP the limit was increased to 65536 GDI objects. Since GDI evidently only allocates a new handle number when all lower handle numbers are in use, this can only actually occur if over 16384 GDI objects ever exist at the same time in the session.
Rebooting would generally remedy this situation, assuming that automatically-started programs don't eat through the first 16384 handles right off the bat.
If "fast user switching" is enabled, another option would be to log out, log some other account (e.g. "guest") in, and log in again. (The important thing here is to end up with a fresh "session"; if you weren't running in "session 0" to start with, the "log some other account" step is irrelevant.)
The linked page also offers a patch to remove the shifts from wow32.dll. Be warned, though: as the page says, applying this patch might be illegal; furthermore, it might be dangerous, and would certainly break whatever app(s) the shift was added for in the first place.
freecell.execopied from Windows 98 (along with the needed 16-bit version of cards.dll), but presumably most any 16-bit windows app would have sufficed. – SamB Jan 12 '11 at 0:08