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.

111 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. admin.cxx
  5. Abstract:
  6. General metadata utility functions.
  7. Author:
  8. Keith Moore (keithmo) 05-Feb-1997
  9. Revision History:
  10. --*/
  11. #include "precomp.hxx"
  12. #pragma hdrstop
  13. //
  14. // Private constants.
  15. //
  16. //
  17. // Private types.
  18. //
  19. //
  20. // Private globals.
  21. //
  22. //
  23. // Private prototypes.
  24. //
  25. //
  26. // Public functions.
  27. //
  28. HRESULT
  29. MdGetAdminObject(
  30. OUT IMSAdminBase ** AdmCom
  31. )
  32. {
  33. HRESULT result;
  34. IClassFactory * classFactory;
  35. //
  36. // Get the admin class factory.
  37. //
  38. result = CoGetClassObject(
  39. GETAdminBaseCLSID(TRUE),
  40. CLSCTX_SERVER,
  41. NULL,
  42. IID_IClassFactory,
  43. (VOID **)&classFactory
  44. );
  45. if( SUCCEEDED(result) ) {
  46. //
  47. // Create the admin object.
  48. //
  49. result = classFactory->CreateInstance(
  50. NULL,
  51. IID_IMSAdminBase,
  52. (VOID **)AdmCom
  53. );
  54. classFactory->Release();
  55. }
  56. return result;
  57. } // MdGetAdminObject
  58. HRESULT
  59. MdReleaseAdminObject(
  60. IN IMSAdminBase * AdmCom
  61. )
  62. {
  63. //
  64. // Terminate the admin object.
  65. //
  66. AdmCom->Release();
  67. return NO_ERROR;
  68. } // MdReleaseAdminObject
  69. //
  70. // Private functions.
  71. //