c - Lowercase windows.h and uppercase Windows.h difference?

ID : 274352

viewed : 37

Tags : cwinapic

Top 4 Answer for c - Lowercase windows.h and uppercase Windows.h difference?

vote vote


The file systems on Windows are case insensitve so either one will work when compiling on Windows. However, if you were to compile on Linux using the MinGW cross compiler for example, the case would matter.

The MinGW windows.h header always seems to be lower case.

The Windows.h file provided with Microsoft's tools have used a variety of cases.

  • old VC++ installations (VC++98 and earlier) appear to install WINDOWS.H - all caps
  • newer VC++ installations and Windows SDKs seem to use Windows.h
  • some mobile device SDKs (PocketPC or Windows mobile) use windows.h - all lowercase.

Since windows.h will always work on both Windows and a Linux cross compile, I'd use #include <windows.h> if I ever thought about it. Which I can't recall doing until answering this.

I wouldn't worry about this too much. Even if the capitalized form finds its way onto a Linux MinGW build, an easy (if maybe annoying) fix is to create a Windows.h file that just turns around and includes windows.h.

vote vote


There is no difference, and nor could there be as file names on windows (NTFS) are case insensitive.

Actually, according to Filenames are Case Sensitive on NTFS Volumes NTFS has two different modes where one is case sensitive:

NTFS supports two slightly different modes of operation that can be selected by the subsystem of the application interacting with NTFS. The first is fully case sensitive and demands that file names supplied by the application match the names stored on disk including case if the file on disk is to be selected. The second mode of operation is case preserving but not case sensitive. This means that applications can select files on the disk even if the supplied name differs in case from the name stored on the disk. Note that both modes preserve the case used to create the files. The difference in behavior noted here applies only when an application needs to locate an existing file. POSIX takes advantage of the full case sensitive mode, while MS-DOS, WOW, and Win32 subsystems use the case insensitive mode.

vote vote


Those are the very same files windows file system is case insensitive

vote vote


Top 3 video Explaining c - Lowercase windows.h and uppercase Windows.h difference?