Source code of Windows XP (NT5)
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.

66 lines
1.5 KiB

  1. #include "basepch.h"
  2. #include "sxsapi.h"
  3. DEFINE_PROCNAME_ENTRIES(sxs)
  4. {
  5. DLPENTRY(SxsBeginAssemblyInstall)
  6. DLPENTRY(SxsEndAssemblyInstall)
  7. DLPENTRY(SxsInstallAssemblyW)
  8. };
  9. DEFINE_PROCNAME_MAP(sxs)
  10. static BOOL g_fSxsBeginAssemblyInstallFailed = FALSE;
  11. static BOOL g_fSxsInstallAssemblyFailed = FALSE;
  12. BOOL
  13. WINAPI
  14. SxsBeginAssemblyInstall(
  15. IN DWORD Flags,
  16. IN PSXS_INSTALLATION_FILE_COPY_CALLBACK InstallationCallback OPTIONAL,
  17. IN PVOID InstallationContext OPTIONAL,
  18. IN PSXS_IMPERSONATION_CALLBACK ImpersonationCallback OPTIONAL,
  19. IN PVOID ImpersonationContext OPTIONAL,
  20. OUT PVOID *InstallCookie
  21. )
  22. {
  23. g_fSxsBeginAssemblyInstallFailed = TRUE;
  24. if (InstallCookie != NULL) {
  25. *InstallCookie = NULL;
  26. }
  27. SetLastError(ERROR_PROC_NOT_FOUND);
  28. return FALSE;
  29. }
  30. BOOL
  31. WINAPI
  32. SxsInstallAssemblyW(
  33. IN PVOID InstallCookie OPTIONAL,
  34. IN DWORD Flags,
  35. IN PCWSTR ManifestPath,
  36. IN OUT PVOID Reserved OPTIONAL
  37. )
  38. {
  39. g_fSxsInstallAssemblyFailed = TRUE;
  40. SetLastError(ERROR_PROC_NOT_FOUND);
  41. return FALSE;
  42. }
  43. BOOL
  44. WINAPI
  45. SxsEndAssemblyInstall(
  46. IN PVOID InstallCookie,
  47. IN DWORD Flags,
  48. IN OUT PVOID Reserved OPTIONAL
  49. )
  50. {
  51. if (g_fSxsBeginAssemblyInstallFailed || g_fSxsInstallAssemblyFailed) {
  52. // stage this since it is dependent on headers that are published later in the build
  53. #if defined(MYASSERT)
  54. MYASSERT(Flags & SXS_END_ASSEMBLY_INSTALL_ABORT);
  55. #endif
  56. return TRUE;
  57. }
  58. SetLastError(ERROR_PROC_NOT_FOUND);
  59. return FALSE;
  60. }