char buffer[MAX_PATH];
SHGetSpecialFolderPath(NULL,buffer, CSIDL_INTERNET,FALSE );
Error: cannot convert parameter 2 from ‘char [260]’ to ‘LPWSTR’
The OS windows 7 64 bit and Visual Studio 2010. I want to run this code in both windows XP as well as Win7.
You are building targeting Unicode rather than ANSI. But you are passing an ANSI buffer. You can fix this by a number of means:
wchar_t buffer[MAX_PATH].SHGetSpecialFolderPathA.My preference would be to use a Unicode buffer, option 1.