return(ErrorMsgDiskSpace(ullDSAPath, ullDSRPath, sgProduct.szPath, FALSE));
return(ErrorMsgDiskSpace(ullDSTotalAvailable, ullDSTotalRequired, sgProduct.szPath, FALSE));
HRESULT VerifyDiskSpace(){  ULONGLONG ullDSAPath;  ULONGLONG ullDSRPath;  ULONGLONG ullDSASysPath;  ULONGLONG ullDSRSysPath;  ULONGLONG ullDSATempPath;  ULONGLONG ullDSRTempPath;  ULONGLONG ullDSTotalAvailable;  ULONGLONG ullDSTotalRequired;  HRESULT   hRetValue = TRUE;  char      szSysPath[MAX_BUF];  char      szBufPath[MAX_BUF];  char      szBufSysPath[MAX_BUF];  char      szBufTempPath[MAX_BUF];  /* Calculate disk space for destination path */  ullDSAPath = GetDiskSpaceAvailable(sgProduct.szPath);  ullDSRPath = GetDiskSpaceRequired(DSR_DESTINATION);  if(GetSystemDirectory(szSysPath, MAX_BUF) != 0)  {    /* Calculate disk space for system path */    ullDSASysPath = GetDiskSpaceAvailable(szSysPath);    ullDSRSysPath = GetDiskSpaceRequired(DSR_SYSTEM);  }  else  {    ullDSASysPath = 0;    ullDSRSysPath = 0;    ZeroMemory(szSysPath, MAX_BUF);  }  /* Calculate disk space for temp path */  ullDSATempPath = GetDiskSpaceAvailable(szTempDir);  ullDSRTempPath = GetDiskSpaceRequired(DSR_TEMP);  ParsePath(sgProduct.szPath, szBufPath,      sizeof(szBufPath),     PP_ROOT_ONLY);  ParsePath(szSysPath,        szBufSysPath,   sizeof(szBufSysPath),  PP_ROOT_ONLY);  ParsePath(szTempDir,        szBufTempPath,  sizeof(szBufTempPath), PP_ROOT_ONLY);  AppendBackSlash(szBufPath,      sizeof(szBufPath));  AppendBackSlash(szBufSysPath,   sizeof(szBufSysPath));  AppendBackSlash(szBufTempPath,  sizeof(szBufTempPath));  /* destination == temp == system */  if((lstrcmpi(szBufPath, szBufTempPath) == 0) &&     (lstrcmpi(szBufPath, szBufSysPath)  == 0))  {    ullDSTotalRequired  = ullDSRPath + ullDSRTempPath + ullDSRSysPath;    ullDSTotalAvailable = ullDSAPath;    if(ullDSTotalAvailable < ullDSTotalRequired)      return(ErrorMsgDiskSpace(ullDSAPath, ullDSRPath, sgProduct.szPath, FALSE));  }  else  {    if((lstrcmpi(szBufPath,     szBufTempPath) != 0) &&       (lstrcmpi(szBufPath,     szBufSysPath)  != 0) &&       (lstrcmpi(szBufTempPath, szBufSysPath)  != 0))    {      /* check TEMP drive */      if(ullDSATempPath < ullDSRTempPath)      {        return(ErrorMsgDiskSpace(ullDSATempPath, ullDSRTempPath, szTempDir, TRUE));      }      /* check SYSTEM drive */      if(ullDSASysPath < ullDSRSysPath)      {        return(ErrorMsgDiskSpace(ullDSASysPath, ullDSRSysPath, szSysPath, TRUE));      }      /* check Destination drive */      if(ullDSAPath < ullDSRPath)      {        return(ErrorMsgDiskSpace(ullDSAPath, ullDSRPath, sgProduct.szPath, FALSE));      }    }    else    {      /* temp == system */      if(lstrcmpi(szBufTempPath, szBufSysPath) == 0)      {        /* check temp + system */        if(ullDSATempPath < (ullDSRTempPath + ullDSRSysPath))          return(ErrorMsgDiskSpace(ullDSATempPath, (ullDSRTempPath + ullDSRSysPath), szTempDir, TRUE));        /* check destination only */        if(ullDSAPath < ullDSRPath)          return(ErrorMsgDiskSpace(ullDSAPath, ullDSRPath, sgProduct.szPath, FALSE));      }      /* destination == temp */      if(lstrcmpi(szBufPath, szBufTempPath) == 0)      {        /* check destination + temp */        if(ullDSAPath < (ullDSRPath + ullDSRTempPath))          return(ErrorMsgDiskSpace(ullDSAPath, (ullDSRPath + ullDSRTempPath), sgProduct.szPath, FALSE));        /* check system only */        if(ullDSASysPath < ullDSRSysPath)          return(ErrorMsgDiskSpace(ullDSASysPath, ullDSRSysPath, szSysPath, TRUE));      }      /* destination == system */      if(lstrcmpi(szBufPath, szBufSysPath) == 0)      {        /* check destination + system */        if(ullDSAPath < (ullDSRPath + ullDSRSysPath))          return(ErrorMsgDiskSpace(ullDSAPath, (ullDSRPath + ullDSRSysPath), sgProduct.szPath, FALSE));        /* check temp only */        if(ullDSATempPath < ullDSRTempPath)          return(ErrorMsgDiskSpace(ullDSATempPath, ullDSRTempPath, szTempDir, TRUE));      }    }  }  return(FALSE);}