Is a given file shortcut to some other file?

ShGetFileInfo is the API that helps in finding out whether a file is a shortcut to some other file. Here is wrapper function… [sourcecode language=’cpp’]bool IsShortcut( LPCTSTR lpctszPath_i ) { SHFILEINFO shFileInfo = { 0 }; return (( SHGetFileInfo( lpctszPath_i, 0, &shFileInfo, sizeof( shFileInfo ), SHGFI_ATTRIBUTES )) && ( shFileInfo.dwAttributes & SFGAO_LINK ) == SFGAO_LINK […]
Continue reading…