Reputation: 3
I tried to use FindFirstFile WIN API function in my c program and noticed that i can use it after including Windows.h in Visual Studio 2010. I am a bit confused because i never installed the Windows SDK on that system. I thought one can only use Windows.h after installing the Windows SDK. Can someone explain to me why this is possible? Also i am wondering about the starting capital Letter of Windows.h. In the past i used windows.h. I have to do a presentation of my code on a computer with only Visual Studio 2010 installed and need to be sure that it will compile on that computer. Big thanks for any helpful information!
Upvotes: 0
Views: 802
Reputation: 6260
The Windows SDK isn't the only way to get the headers - they are also included with Visual Studio.
Visual C++ and the Windows Header Files
Microsoft Visual C++ includes copies of the Windows header files that were current at the time Visual C++ was released. Therefore, if you install updated header files from an SDK, you may end up with multiple versions of the Windows header files on your computer. If you do not ensure that you are using the latest version of the SDK header files, you will receive the following error code when compiling code that uses features that were introduced after Visual C++ was released: error C2065: undeclared identifier.
Source: http://msdn.microsoft.com/en-gb/library/windows/desktop/aa383745(v=vs.85).aspx)
Upvotes: 1