By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.

SignUp Now!


In Windows 10 (64-bit, latest version of 4console.dll, and tcc.exe), I keep getting the following error message:

> seticon c:\Windows\Resources\icons\tcc_blk.ico
SETICON error: code = -4

> dir c:\Windows\Resources\icons\tcc_blk.ico
10.06.2009 07:56 13.262 tcc_blk.ico

the icon file is loaded though. The error does not appear in Windows 7. Any clues?
SetConsoleIcon is undocumented, so I have no documentation and its behavior may have changed. And I don't have Windows 10 to test on. After trying to get a handle (hIcon) to the icon you want, SETICON does this.
if ( hIcon != NULL )
       rv = -4;
       hOldIcon = GetConsoleIcon();
       if ( SetConsoleIcon(hIcon) )
           rv = 0;

So, apparently, it's succeeding (you said it works, right?) but returning FALSE
I still don't have Windows10 to test on. Is it the same problem as above ... working but giving an error message? If it does work, you could (temporarily) redirect the error message to NUL (2> NUL). I'll look at it this weekend but I'll be flying blind.
I put a new build of 4CONSOLE on ftp://lucky.syr.edu. I didn't change the logic in SETICON, so it may still succeed but say it didn't. But I did change the error handling, so we might get a more enlightening error message.
Thanks for the new DLL. However, now I receive the error (Windows 10 only) in the attached image...


  • 01.png
    14.2 KB · Views: 253
The icon is not changed (I got this wrong in my initial post, as the first TCC started would have a different icon statically assigned), and %_? is -4.

Thanks for looking into this!