Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.3 KiB

  1. #ifndef _UNINSTAL_H
  2. /*
  3. * Errors that *we* have defined
  4. */
  5. #define MYERROR_UNKNOWN -1 // maps to no msg
  6. #define MYERROR_DISK_FULL -2 // maps to MSG_ERROR_DISK_FULL
  7. #define MYERROR_BAD_DATA -3 // maps to MSG_ERROR_BAD_DATA
  8. #define MYERROR_UNEXPECTED_EOF -4 // maps to MSG_ERROR_UNEXPECTED_EOF
  9. #define MYERROR_READ -5
  10. #define MYERROR_WRITE -6
  11. #define MYERROR_BAD_SIG -7
  12. #define MYERROR_DECOMP_FAILURE -8
  13. #define MYERROR_OUTOFMEMORY -9
  14. #define MYERROR_BAD_BAK -10
  15. #define MYERROR_BAD_CRC -11
  16. // define the bad-backup file attribute value
  17. #define NO_FILE -1
  18. typedef struct _BAKDATA {
  19. HANDLE hDatFile;
  20. DWORD dwDatOffset;
  21. char szIniFileName[MAX_PATH]; // used while making temp ini files
  22. char szFinalDir[MAX_PATH]; // Final resting place of w95undo.*
  23. } BAKDATA, FAR *PBAKDATA;
  24. typedef struct _FILELIST {
  25. char* name;
  26. // char* bakname;
  27. UINT bak_exists;
  28. DWORD bak_attribute;
  29. FILETIME FileTime;
  30. DWORD dwSize;
  31. DWORD dwDatOffset;
  32. DWORD dwFileCRC;
  33. DWORD dwRefCount;
  34. struct _FILELIST * next;
  35. } FILELIST;
  36. //RC PRIVATE SaveBackups( );
  37. BOOL BackupInit(PBAKDATA pbd, LPCSTR lpszPath);
  38. int Files_need_backup( FILELIST *filelist );
  39. BOOL ReplaceBackups(FILELIST * filelist, char * StfWinDir);
  40. int Files_need_backup( FILELIST *filelist );
  41. void backups_exist(FILELIST * filelist);
  42. BOOL BackupSingleFile(FILELIST * filelist, PBAKDATA pbd);
  43. BOOL GetValueForFileFromIni(FILELIST *FileList);
  44. int DosPrintf(PBAKDATA pbd, FILELIST *filelist, DWORD dwFileSize,
  45. FILETIME FileTime, DWORD dwDatOffset, DWORD dwCRC);
  46. void WriteUninstallDirToReg(LPSTR lpszUninstallDir);
  47. void DeleteUninstallDirFromToReg();
  48. //BOOL GetFieldString(LPSTR lpszLine, int iField, LPSTR lpszField, int cbSize);
  49. BOOL MakeBakName(LPSTR lpszName, LPSTR szBakName);
  50. BOOL DoSaveUninstall(BOOL bStopUninstall);
  51. BOOL GetUninstallDirFromReg(LPSTR lpszUninstallDir);
  52. BOOL DetermineUninstallDir(FILELIST *FileList, LPSTR lpszUninstallDir, DWORD *pdwSizeNeeded);
  53. BOOL UninstallInfoExists();
  54. void DeleteUninstallFilesAndReg();
  55. void SetUninstallFileAttrib(LPSTR szPath);
  56. BOOL ValidateUninstallFiles(LPSTR lpszPath);
  57. #endif