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.

91 lines
3.3 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. undo.h
  5. Abstract:
  6. Declares the interfaces for osuninst.lib, a library of uninstall functions.
  7. Author:
  8. Jim Schmidt (jimschm) 19-Jan-2001
  9. Revision History:
  10. <alias> <date> <comments>
  11. --*/
  12. #pragma once
  13. typedef enum {
  14. Uninstall_Valid = 0, // uninstall is possible (backup image passed sanity check)
  15. Uninstall_DidNotFindRegistryEntries, // reg entries that point to backup image/prev os data are gone
  16. Uninstall_DidNotFindDirOrFiles, // one or more backup files are missing, or undo dir is gone
  17. Uninstall_InvalidOsVersion, // api called on an unexpected platform (example: user copied dll to Win2k)
  18. Uninstall_NotEnoughPrivileges, // can't evaluate backup image because of lack of authority
  19. Uninstall_FileWasModified, // backup image was tampered with by someone
  20. Uninstall_Unsupported, // uninstall is not supported
  21. Uninstall_NewImage, // image is less than 7 days old (not exposed by osuninst.dll)
  22. Uninstall_CantRetrieveSystemInfo, // cannot retrieve integrity information from registry
  23. Uninstall_WrongDrive, // user had changed layout,disk,file system.
  24. Uninstall_DifferentNumberOfDrives, // user had added/removed drive(s)
  25. Uninstall_NotEnoughSpace, // not enough space to perform uninstall
  26. Uninstall_Exception, // caller passed in invalid arg to an osuninst.dll api
  27. Uninstall_OldImage, // image is more than 30 days old
  28. Uninstall_NotEnoughMemory, // not enough memory to perform uninstall
  29. Uninstall_DifferentDriveLetter, // user has changed drive letter
  30. Uninstall_DifferentDriveFileSystem, // user has changed drive file system
  31. Uninstall_DifferentDriveGeometry, // drive geometry has been changed
  32. Uninstall_DifferentDrivePartitionInfo // drive partition has changed
  33. } UNINSTALLSTATUS;
  34. typedef enum {
  35. Uninstall_DontCare = 0, // try to avoid using this value; instead expand this enum whenever possible
  36. Uninstall_FatToNtfsConversion, // caller is going to convert FAT to NTFS
  37. Uninstall_PartitionChange, // caller is going to alter the partition configuration
  38. Uninstall_Upgrade // caller is going to upgrade the OS
  39. } UNINSTALLTESTCOMPONENT;
  40. //
  41. // NOTE: BackedUpOsVersion is filled only when Uninstall_Valid is returned
  42. //
  43. UNINSTALLSTATUS
  44. IsUninstallImageValid (
  45. IN UNINSTALLTESTCOMPONENT ComponentToTest,
  46. OUT OSVERSIONINFOEX *BackedUpOsVersion OPTIONAL
  47. );
  48. BOOL
  49. RemoveUninstallImage (
  50. VOID
  51. );
  52. ULONGLONG
  53. GetUninstallImageSize (
  54. VOID
  55. );
  56. BOOL
  57. ProvideUiAlerts (
  58. IN HWND UiParent
  59. );
  60. BOOL
  61. ExecuteUninstall (
  62. VOID
  63. );
  64. typedef UNINSTALLSTATUS(WINAPI * ISUNINSTALLIMAGEVALID)(UNINSTALLTESTCOMPONENT, OSVERSIONINFOEX *);
  65. typedef ULONGLONG(WINAPI * GETUNINSTALLIMAGESIZE)(VOID);
  66. typedef BOOL(WINAPI * REMOVEUNINSTALLIMAGE)(VOID);
  67. typedef BOOL(WINAPI * PROVIDEUIALERTS)(HWND);
  68. typedef BOOL(WINAPI * EXECUTEUNINSTALL)(VOID);