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.

77 lines
2.4 KiB

  1. #if !defined(SERVICES__ComManager_inl__INCLUDED)
  2. #define SERVICES__ComManager_inl__INCLUDED
  3. #pragma once
  4. //------------------------------------------------------------------------------
  5. inline HRESULT
  6. ComManager::CreateInstance(REFCLSID rclsid, IUnknown * punkOuter, REFIID riid, void ** ppv)
  7. {
  8. AssertMsg(IsInit(sCOM), "Must be successfully initialized before calling");
  9. return (s_pfnCreate)(rclsid, punkOuter, CLSCTX_INPROC, riid, ppv);
  10. }
  11. //------------------------------------------------------------------------------
  12. inline BSTR
  13. ComManager::SysAllocString(const OLECHAR * psz)
  14. {
  15. AssertMsg(IsInit(sAuto), "Must be successfully initialized before calling");
  16. return (s_pfnAllocString)(psz);
  17. }
  18. //------------------------------------------------------------------------------
  19. inline HRESULT
  20. ComManager::SysFreeString(BSTR bstr)
  21. {
  22. AssertMsg(IsInit(sAuto), "Must be successfully initialized before calling");
  23. return (s_pfnFreeString)(bstr);
  24. }
  25. //------------------------------------------------------------------------------
  26. inline HRESULT
  27. ComManager::VariantInit(VARIANTARG * pvarg)
  28. {
  29. AssertMsg(IsInit(sAuto), "Must be successfully initialized before calling");
  30. return (s_pfnVariantInit)(pvarg);
  31. }
  32. //------------------------------------------------------------------------------
  33. inline HRESULT
  34. ComManager::VariantClear(VARIANTARG * pvarg)
  35. {
  36. AssertMsg(IsInit(sAuto), "Must be successfully initialized before calling");
  37. return (s_pfnVariantClear)(pvarg);
  38. }
  39. //------------------------------------------------------------------------------
  40. inline HRESULT
  41. ComManager::RegisterDragDrop(HWND hwnd, IDropTarget * pDropTarget)
  42. {
  43. AssertMsg(IsInit(sOLE), "Must be successfully initialized before calling");
  44. return (s_pfnRegisterDragDrop)(hwnd, pDropTarget);
  45. }
  46. //------------------------------------------------------------------------------
  47. inline HRESULT
  48. ComManager::RevokeDragDrop(HWND hwnd)
  49. {
  50. AssertMsg(IsInit(sOLE), "Must be successfully initialized before calling");
  51. return (s_pfnRevokeDragDrop)(hwnd);
  52. }
  53. //------------------------------------------------------------------------------
  54. inline void
  55. ComManager::ReleaseStgMedium(STGMEDIUM * pstg)
  56. {
  57. AssertMsg(IsInit(sOLE), "Must be successfully initialized before calling");
  58. (s_pfnReleaseStgMedium)(pstg);
  59. }
  60. #endif // SERVICES__ComManager_inl__INCLUDED