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.

38 lines
707 B

  1. /*++
  2. Copyright (C) 2000-2001 Microsoft Corporation
  3. --*/
  4. #include <windows.h>
  5. #include <wbemidl.h>
  6. #include <commain.h>
  7. #include <clsfac.h>
  8. #include <creposit.h>
  9. #include <initguid.h>
  10. #ifndef INITGUID
  11. #define INITGUID
  12. #endif
  13. DEFINE_GUID(CLSID_A51Repository,
  14. 0x7998dc37, 0xd3fe, 0x487c, 0xa6, 0x0a, 0x77, 0x01, 0xfc, 0xc7, 0x0c, 0xc6);
  15. class CMyServer : public CComServer
  16. {
  17. public:
  18. HRESULT Initialize()
  19. {
  20. AddClassInfo(CLSID_A51Repository,
  21. new CSimpleClassFactory<CRepository>(GetLifeControl()),
  22. L"A51 Repository", TRUE);
  23. return S_OK;
  24. }
  25. HRESULT InitializeCom()
  26. {
  27. return CoInitializeEx(NULL, COINIT_MULTITHREADED);
  28. }
  29. } Server;