MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / PathIsLnkFile

Function PathIsLnkFile

src/Helpers.c:970–996  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// Name: PathIsLnkFile() Purpose: Determine wheter pszPath is a Windows Shell Link File by comparing the filename extension with L".lnk" Manipulates:

Source from the content-addressed store, hash-verified

968// Manipulates:
969//
970BOOL PathIsLnkFile ( LPCWSTR pszPath )
971{
972 //WCHAR *pszExt;
973 WCHAR tchResPath[256];
974 if ( !pszPath || !*pszPath ) {
975 return FALSE;
976 }
977 /*pszExt = StrRChr(pszPath,NULL,L'.');
978
979 if (!pszExt)
980 return FALSE;
981
982 if (!lstrcmpi(pszExt,L".lnk"))
983 return TRUE;
984
985 else
986 return FALSE;*/
987 //if (!lstrcmpi(PathFindExtension(pszPath),L".lnk"))
988 // return TRUE;
989 //else
990 // return FALSE;
991 if ( lstrcmpi ( PathFindExtension ( pszPath ), L".lnk" ) ) {
992 return FALSE;
993 } else {
994 return PathGetLnkPath ( pszPath, tchResPath, COUNTOF ( tchResPath ) );
995 }
996}
997
998
999///////////////////////////////////////////////////////////////////////////////

Callers 3

PathIsLnkToDirectoryFunction · 0.85
OpenWithDlgFunction · 0.85
_FileLoadFunction · 0.85

Calls 1

PathGetLnkPathFunction · 0.85

Tested by

no test coverage detected