src/Helpers.c
bool PathIsLnkToDirectory(LPCWSTR pszPath,LPWSTR pszResPath,int cchResPath)
{
  if (PathIsLnkFile(pszPath)) {
    WCHAR tchResPath[MAX_PATH] = { L'\0' };
    if (PathGetLnkPath(pszPath, tchResPath, sizeof(WCHAR)*COUNTOF(tchResPath))) {
      if (PathIsDirectory(tchResPath)) {
        StringCchCopyN(pszResPath, cchResPath, tchResPath, COUNTOF(tchResPath));
        return (true);
      }
    }
  }
  return false;
}
///////////////////////////////////////////////////////////////////////////////
//
//
//  Name: PathIsLnkToDirectory()
//
//  Purpose: Determine wheter pszPath is a Windows Shell Link File which
//           refers to a directory
//
//  Manipulates: pszResPath
//
PathIsLnkToDirectory()
Purpose: Determine wheter pszPath is a Windows Shell Link File which
refers to a directory


PathIsLnkToDirectory () Purpose : Determine wheter pszPath is a Windows Shell Link File which refers to a directory
bool PathIsLnkToDirectory(LPCWSTR pszPath,LPWSTR pszResPath,int cchResPath)
{
  if (PathIsLnkFile(pszPath)) {
    WCHAR tchResPath[MAX_PATH] = { L'\0' };
    if (PathGetLnkPath(pszPath, tchResPath, sizeof(WCHAR)*COUNTOF(tchResPath))) {
      if (PathIsDirectory(tchResPath)) {
        StringCchCopyN(pszResPath, cchResPath, tchResPath, COUNTOF(tchResPath));
        return (true);
      }
    }
  }
  return false;
}
bool PathIsLnkToDirectory ( LPCWSTR pszPath , LPWSTR pszResPath , int cchResPath ) { if ( PathIsLnkFile ( pszPath ) ) { WCHAR tchResPath [ MAX_PATH ] = { L' \0 ' } ; if ( PathGetLnkPath ( pszPath , tchResPath , sizeof ( WCHAR ) * COUNTOF ( tchResPath ) ) ) { if ( PathIsDirectory ( tchResPath ) ) { StringCchCopyN ( pszResPath , cchResPath , tchResPath , COUNTOF ( tchResPath ) ) ; return ( true ) ; } } } return false ; }
Name: PathIsLnkToDirectory()
Purpose: Determine wheter pszPath is a Windows Shell Link File which
refers to a directory
Name : PathIsLnkToDirectory () Purpose : Determine wheter pszPath is a Windows Shell Link File which refers to a directory