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

Function PathIsLnkToDirectory

src/Helpers.c:1054–1071  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// Name: PathIsLnkToDirectory() Purpose: Determine wheter pszPath is a Windows Shell Link File which refers to a directory Manipulates: pszResPath

Source from the content-addressed store, hash-verified

1052// Manipulates: pszResPath
1053//
1054BOOL PathIsLnkToDirectory ( LPCWSTR pszPath, LPWSTR pszResPath, int cchResPath )
1055{
1056 WCHAR tchResPath[MAX_PATH];
1057 if ( PathIsLnkFile ( pszPath ) ) {
1058 if ( PathGetLnkPath ( pszPath, tchResPath, sizeof ( WCHAR ) *COUNTOF ( tchResPath ) ) ) {
1059 if ( PathIsDirectory ( tchResPath ) ) {
1060 lstrcpyn ( pszResPath, tchResPath, cchResPath );
1061 return ( TRUE );
1062 } else {
1063 return FALSE;
1064 }
1065 } else {
1066 return FALSE;
1067 }
1068 } else {
1069 return FALSE;
1070 }
1071}
1072
1073
1074///////////////////////////////////////////////////////////////////////////////

Callers 1

MsgCommandFunction · 0.85

Calls 2

PathIsLnkFileFunction · 0.85
PathGetLnkPathFunction · 0.85

Tested by

no test coverage detected