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.

52 lines
1.5 KiB

  1. //+---------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1994.
  5. //
  6. // File: d:\nt\private\ole32\comcat\src\catfact.cpp
  7. //
  8. // Contents: This is a stub for comcat.dll after it's merged into
  9. // ole32.dll. It will forward DllGetRegisterServer and
  10. // DllGetClassObject to ole32.dll, local version of
  11. // DllCanUnloadNow and DllUnregisterServer is provided.
  12. //
  13. // Classes:
  14. //
  15. // Functions: DllUnregisterServer
  16. // DllCanUnloadNow
  17. // DllRegisterServer
  18. //
  19. // History: 10-Mar-97 YongQu Created
  20. //+---------------------------------------------------------------------
  21. #include <windows.h>
  22. #include <ole2.h>
  23. #include <tchar.h>
  24. #pragma comment(linker, "/export:DllGetClassObject=Ole32.DllGetClassObject,PRIVATE")
  25. // Due to NT bug #314014, we no longer explicitly forward DllRegisterServer
  26. // to ole32. The reason: ole32 also registers other components (namely storage)
  27. // which access reg keys that cannot be written by non-admin accounts. Since
  28. // ole32, and by extension comcat, is already registered on the system,
  29. // comcat's DllRegisterServer can be a no-op.
  30. //#pragma comment(linker, "/export:DllRegisterServer=Ole32.DllRegisterServer,PRIVATE")
  31. STDAPI DllRegisterServer()
  32. {
  33. return S_OK;
  34. }
  35. // can never unload
  36. STDAPI DllCanUnloadNow()
  37. {
  38. return S_FALSE;
  39. }
  40. // still provide this, but seems to be unnecessary
  41. STDAPI DllUnregisterServer(void)
  42. {
  43. return NOERROR;
  44. }