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.

66 lines
1.7 KiB

  1. /*
  2. * o l e u t i l . h
  3. *
  4. * Purpose: OLE utilities
  5. *
  6. * Owner: brettm
  7. *
  8. * Copyright (C) Microsoft Corp. 1995, 1996.
  9. */
  10. #ifndef _OLEUTIL_H
  11. #define _OLEUTIL_H
  12. #include <docobj.h>
  13. /*
  14. * Persist Functions
  15. */
  16. HRESULT HrInitNew(LPUNKNOWN pUnk);
  17. HRESULT HrIPersistStreamLoad(LPUNKNOWN pUnk, LPSTREAM pstm);
  18. HRESULT HrIPersistStreamInitLoad(LPUNKNOWN pUnk, LPSTREAM pstm);
  19. HRESULT HrIPersistFileSave(LPUNKNOWN pUnk, LPSTR lpszFile);
  20. HRESULT HrIPersistFileLoad(LPUNKNOWN pUnk, LPSTR lpszFile);
  21. HRESULT HrLoadSync(LPUNKNOWN pUnk, LPSTR lpszFile);
  22. /*
  23. * Data Object functions
  24. */
  25. HRESULT HrGetDataStream(LPUNKNOWN pUnk, CLIPFORMAT cf, LPSTREAM *ppstm);
  26. HRESULT CmdSelectAllCopy(LPOLECOMMANDTARGET pCmdTarget);
  27. /*
  28. * IDispatch Helpers
  29. */
  30. HRESULT GetDispProp(IDispatch * pDisp, DISPID dispid, LCID lcid, VARIANT *pvar, EXCEPINFO * pexcepinfo);
  31. HRESULT SetDispProp(IDispatch *pDisp, DISPID dispid, LCID lcid, VARIANTARG *pvarg, EXCEPINFO *pexcepinfo, DWORD dwFlags);
  32. /*
  33. * OLE Allocator Helpers
  34. */
  35. HRESULT HrCoTaskStringDupeToW(LPCSTR lpsz, LPOLESTR *ppszW);
  36. #define SafeCoTaskMemFree(_pv) \
  37. { \
  38. if (_pv) \
  39. { \
  40. CoTaskMemFree(_pv); \
  41. _pv=NULL; \
  42. } \
  43. }
  44. /*
  45. * Debug Helpers
  46. */
  47. #ifdef DEBUG
  48. void DebugPrintInterface(REFIID riid, char *szPrefix);
  49. void DebugPrintCmdIdBlock(ULONG cCmds, OLECMD *rgCmds);
  50. #else
  51. #define DebugPrintInterface 1 ? (void)0 : (void)
  52. #define DebugPrintCmdIdBlock 1 ? (void)0 : (void)
  53. #endif
  54. #define RECT_WIDTH(_prc) (_prc->right - _prc->left)
  55. #define RECT_HEIGHT(_prc) (_prc->bottom - _prc->top)
  56. #endif //_OLEUTIL_H