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.

129 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. stub.c
  5. Abstract:
  6. Stubbed out Windows File Protection APIs. These APIs are "Millenium" SFC
  7. apis, which we simply stub out so that any clients programming to these
  8. APIs may work on both platforms
  9. Author:
  10. Andrew Ritz (andrewr) 23-Sep-1999
  11. Revision History:
  12. --*/
  13. #include "sfcp.h"
  14. #pragma hdrstop
  15. #include <srrestoreptapi.h>
  16. DWORD
  17. WINAPI
  18. SfpInstallCatalog(
  19. IN LPCTSTR pszCatName,
  20. IN LPCTSTR pszCatDependency,
  21. IN PVOID Reserved
  22. )
  23. {
  24. return ERROR_CALL_NOT_IMPLEMENTED;
  25. }
  26. DWORD
  27. WINAPI
  28. SfpDeleteCatalog(
  29. IN LPCTSTR pszCatName,
  30. IN PVOID Reserved
  31. )
  32. {
  33. return ERROR_CALL_NOT_IMPLEMENTED;
  34. }
  35. BOOL
  36. WINAPI
  37. SfpVerifyFile(
  38. IN LPCTSTR pszFileName,
  39. IN LPTSTR pszError,
  40. IN DWORD dwErrSize
  41. )
  42. {
  43. SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  44. return(FALSE);
  45. }
  46. #undef SRSetRestorePoint
  47. #undef SRSetRestorePointA
  48. #undef SRSetRestorePointW
  49. typedef BOOL (WINAPI * PSETRESTOREPOINTA) (PRESTOREPOINTINFOA, PSTATEMGRSTATUS);
  50. typedef BOOL (WINAPI * PSETRESTOREPOINTW) (PRESTOREPOINTINFOW, PSTATEMGRSTATUS);
  51. BOOL
  52. WINAPI
  53. SRSetRestorePointA ( PRESTOREPOINTINFOA pRestorePtSpec,
  54. PSTATEMGRSTATUS pSMgrStatus )
  55. {
  56. HMODULE hClient = LoadLibrary (L"SRCLIENT.DLL");
  57. BOOL fReturn = FALSE;
  58. if (hClient != NULL)
  59. {
  60. PSETRESTOREPOINTA pSetRestorePointA = (PSETRESTOREPOINTA )
  61. GetProcAddress (hClient, "SRSetRestorePointA");
  62. if (pSetRestorePointA != NULL)
  63. {
  64. fReturn = (* pSetRestorePointA) (pRestorePtSpec, pSMgrStatus);
  65. }
  66. else if (pSMgrStatus != NULL)
  67. pSMgrStatus->nStatus = ERROR_CALL_NOT_IMPLEMENTED;
  68. FreeLibrary (hClient);
  69. }
  70. else if (pSMgrStatus != NULL)
  71. pSMgrStatus->nStatus = ERROR_CALL_NOT_IMPLEMENTED;
  72. return fReturn;
  73. }
  74. BOOL
  75. WINAPI
  76. SRSetRestorePointW ( PRESTOREPOINTINFOW pRestorePtSpec,
  77. PSTATEMGRSTATUS pSMgrStatus )
  78. {
  79. HMODULE hClient = LoadLibrary (L"SRCLIENT.DLL");
  80. BOOL fReturn = FALSE;
  81. if (hClient != NULL)
  82. {
  83. PSETRESTOREPOINTW pSetRestorePointW = (PSETRESTOREPOINTW )
  84. GetProcAddress (hClient, "SRSetRestorePointW");
  85. if (pSetRestorePointW != NULL)
  86. {
  87. fReturn = (* pSetRestorePointW) (pRestorePtSpec, pSMgrStatus);
  88. }
  89. else if (pSMgrStatus != NULL)
  90. pSMgrStatus->nStatus = ERROR_CALL_NOT_IMPLEMENTED;
  91. FreeLibrary (hClient);
  92. }
  93. else if (pSMgrStatus != NULL)
  94. pSMgrStatus->nStatus = ERROR_CALL_NOT_IMPLEMENTED;
  95. return fReturn;
  96. }