It may not be the problem of my own procedure, because no matter what new projects I create, I got those 15 errors.
who can copy his winuser.h file and send to me? I am using VC6.0++
Thanks a lot!
my email: <<email snipped>>

Dani AI

Generated

Short, practical checklist to diagnose and fix the winuser.h errors on VC6 (for ). Posting or redistributing Microsoft header files is not appropriate (as already noted). The errors you see in every new project almost always mean the compiler is pulling the wrong or a corrupted header — not that every project suddenly became bad.

Create a tiny test file and force the compiler to show which headers it uses:

#include <windows.h>
int main() { return 0; }

From a Visual Studio 6 command prompt run:

cl /showIncludes test.cpp

Look at the printed include chain to find the exact path to winuser.h the compiler is using. If that path is unexpected, search the disk for other copies (use Explorer or dir /s from cmd) and note duplicates.

Common causes and fixes

  • A newer/older SDK header is being picked up, or a single header was copied from another installation. Do not replace just winuser.h alone — headers must match the rest of the SDK/toolset.
  • Check VC6 include order: Tools → Options → Directories → Show directories for: Include files. Make sure the VC6 include folder (VC98\Include) and any Platform SDK include folder are in the right order for your setup.
  • If the file looks corrupted (weird characters at top, truncated), restore from original VC6 media or a proper Windows SDK installer rather than copying single files.
  • If maintaining VC6 is too painful, consider using a modern free toolset (Visual Studio Community or MinGW) or a VM to preserve the old environment.

If still stuck, capture the first few compiler error messages and the exact full path to the winuser.h being used (as shown by /showIncludes) so the root mismatch can be identified.

Recommended Answers

All 4 Replies

Those are copyright files and it would be illegal to post them on this web site. Why don't you just reinstall the compiler? Better yet, toss that old compiler out and get VC++ 2005 (Express edition is free).

DO you really think I should use VC2005, I mean, compared to the VC++6.0 enterprise version, the free version seemed much less powerful

DO you really think I should use VC2005, I mean, compared to the VC++6.0 enterprise version, the free version seemed much less powerful

Check out the features in VC2005. If they suit your requirements then download it.
If you are not so fussy about using only microsoft products only then you can download other free compilers also like Code::Blocks

DO you really think I should use VC2005, I mean, compared to the VC++6.0 enterprise version, the free version seemed much less powerful

VC2005 is also a lot less buggy and conforms to ISO C++ standard much better. True, you can't do MFC with that free compiler -- you will need to buy at least the Standard edition to get that. Otherwise, VC2005 and the free Windows Platform SDK together will probably suit most non-comnmercial needs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.