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.

37 lines
1.1 KiB

  1. #include "precomp.h"
  2. #include <wmiauthz.h>
  3. #include <commain.h>
  4. #include <clsfac.h>
  5. #include "filtprox.h"
  6. #include "wmiauthz.h"
  7. class CEssProxyServer : public CComServer
  8. {
  9. protected:
  10. HRESULT Initialize()
  11. {
  12. AddClassInfo( CLSID_WbemFilterProxy,
  13. new CSimpleClassFactory<CFilterProxyManager>(GetLifeControl()),
  14. __TEXT("Event filter marshaling proxy"), TRUE);
  15. AddClassInfo( CLSID_WbemTokenCache,
  16. new CSimpleClassFactory<CWmiAuthz>(GetLifeControl()),
  17. __TEXT("Wbem Token Cache"), TRUE );
  18. return S_OK;
  19. }
  20. void Register()
  21. {
  22. // this is for WbemFilterProxyto be used as a marshaler nf NO_CUSTOM_MARSHAL is set
  23. HKEY hKey;
  24. if(ERROR_SUCCESS == RegCreateKey(HKEY_LOCAL_MACHINE,
  25. TEXT("software\\classes\\CLSID\\{6c19be35-7500-11d1-ad94-00c04fd8fdff}\\")
  26. TEXT("Implemented Categories\\{00000003-0000-0000-C000-000000000046}"),
  27. &hKey))
  28. {
  29. RegCloseKey(hKey);
  30. hKey = NULL;
  31. }
  32. }
  33. } g_Server;