////////////////////////////////////////////////////////////////////////// Name: PathIsLnkFile() Purpose: Determine wheter pszPath is a Windows Shell Link File by comparing the filename extension with L".lnk" Manipulates:
| 968 | // Manipulates: |
| 969 | // |
| 970 | BOOL 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 | /////////////////////////////////////////////////////////////////////////////// |
no test coverage detected