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.

111 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1992-1997 Microsoft Corporation
  3. Module Name:
  4. exchange.c
  5. Abstract:
  6. Resource DLL to control and monitor the exchange service.
  7. Author:
  8. Robs 3/28/96, based on RodGa's generic resource dll
  9. Revision History:
  10. --*/
  11. //***********************************************************
  12. //
  13. // Define Exchange Function Table
  14. //
  15. //***********************************************************
  16. #define UNICODE 1
  17. #include "nt.h"
  18. #include "ntrtl.h"
  19. #include "nturtl.h"
  20. #include "windows.h"
  21. //#include "stdio.h"
  22. //#include "stdlib.h"
  23. #include "clusapi.h"
  24. #include "clusudef.h"
  25. #include "resapi.h"
  26. #include "bosvc.h"
  27. #include "xchgclus.h"
  28. //#include "svc.c"
  29. PLOG_EVENT_ROUTINE g_LogEvent = NULL;
  30. PSET_RESOURCE_STATUS_ROUTINE g_SetResourceStatus = NULL;
  31. extern CLRES_FUNCTION_TABLE ExchangeFunctionTable;
  32. DWORD
  33. WINAPI
  34. Startup(
  35. IN LPCWSTR ResourceType,
  36. IN DWORD MinVersionSupported,
  37. IN DWORD MaxVersionSupported,
  38. IN PSET_RESOURCE_STATUS_ROUTINE SetResourceStatus,
  39. IN PLOG_EVENT_ROUTINE LogEvent,
  40. OUT PCLRES_FUNCTION_TABLE *FunctionTable
  41. )
  42. /*++
  43. Routine Description:
  44. Startup a particular resource type. This means verifying the version
  45. requested, and returning the function table for this resource type.
  46. Arguments:
  47. ResourceType - Supplies the type of resource.
  48. MinVersionSupported - The minimum version number supported by the cluster
  49. service on this system.
  50. MaxVersionSupported - The maximum version number supported by the cluster
  51. service on this system.
  52. FunctionTable - Returns the Function Table for this resource type.
  53. Return Value:
  54. ERROR_SUCCESS if successful.
  55. A Win32 error code on failure.
  56. --*/
  57. {
  58. //
  59. // Search for a valid service name supported by this DLL
  60. //
  61. if ( lstrcmpiW( ResourceType, EXCHANGE_RESOURCE_NAME ) != 0 ) {
  62. return(ERROR_UNKNOWN_REVISION);
  63. }
  64. g_LogEvent = LogEvent;
  65. g_SetResourceStatus = SetResourceStatus;
  66. if ( (MinVersionSupported <= CLRES_VERSION_V1_00) &&
  67. (MaxVersionSupported >= CLRES_VERSION_V1_00) ) {
  68. *FunctionTable = &ExchangeFunctionTable;
  69. return(ERROR_SUCCESS);
  70. }
  71. return(ERROR_REVISION_MISMATCH);
  72. } // Startup