I need to be able to read the target of a shortcut (a .lnk file).
I have Googled this and found numerous results that I have found to be helpful: http://cboard.cprogramm
All headers are fine, but you are using wide (wchar_t based) and 'normal' (char based) strings incorrectly: IPersistFile::Load takes a wide string while IShellLinkA::GetPath takes a normal string. Using this should compile:
IShellLinkA* psl; //specify the ansi version explicitely
CoInitialize( 0 ); //you forgot this, needed for all COM calls to work
char* tempStr = new char[ MAX_PATH ];
std::wstring path = L"E:\\shortcuts\\myshortcut.lnk";
Also if you just want the path, you can just pass 0 instead of a pointer to a WIN32_FIND_DATA.