Good evening dear programmers,
As of Windows Vista, SHGetFolderPath is deprecated, and replaced by SHGetKnownFolderPath.
However, my program must be compatible with both OS versions. I used GetVersionEx to determine the version of the OS that the user uses, but the problem comes later on:
main.cpp `SHGetKnownFolderPath' undeclared (first use this function)
I used to get the same problem with SHGetFolderPath which was solved by adding the following to the top of the cpp-file:
#define _WIN32_IE 0x0500
However, SHGetKnownFolderPath is for 502 or higher, and trying a value above it won't solve it, so I'm looking for help here.
If someone has any knowledge about this I'd be really greatful hearing your thoughts.