Here is the define I used, as promised.
I put it right before the #if
(not sure why I used 600 rather than 601 but it works so meh.)
#define _WIN32_WINNT 0x0600
// open the file
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
ScopedHandle hFile( safe_handle( CreateFile2( fileName,
GENERIC_READ,
FILE_SHARE_READ,
OPEN_EXISTING,
nullptr ) ) );
#else
ScopedHandle hFile( safe_handle( CreateFileW( fileName,
GENERIC_READ,
FILE_SHARE_READ,
nullptr,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
nullptr ) ) );
#endif
i am guessing all that mumbo-jambo with preprocessor #if #else #endif is simply to simply test the definition before it works? because it screams about undefined stuff after the #else. and the definition alone does not work like i said in the earlier post.
also 0x600 means Windows Vista as stated in link from earlier post, again.