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.

48 lines
1.3 KiB

  1. /*
  2. * oleutil.h - OLE utility functions description.
  3. */
  4. /* Macros
  5. *********/
  6. /* interface pointer to class pointer conversion macros */
  7. #define IfaceOffset(class, iface) ((UINT_PTR)&(((class *)0)->iface))
  8. #define ClassFromIface(class, iface, piface) ((class *)(((PBYTE)piface) - IfaceOffset(class, iface)))
  9. /* macro wrappers for CompareGUIDs() */
  10. #define CompareClassIDs(pcclsid1, pcclsid2) CompareGUIDs(pcclsid1, pcclsid2)
  11. #define CompareInterfaceIDs(pciid1, pciid2) CompareGUIDs(pciid1, pciid2)
  12. /* Types
  13. ********/
  14. /* interfaces */
  15. DECLARE_STANDARD_TYPES(INotifyReplica);
  16. DECLARE_STANDARD_TYPES(IReconcileInitiator);
  17. DECLARE_STANDARD_TYPES(IReconcilableObject);
  18. DECLARE_STANDARD_TYPES(IBriefcaseInitiator);
  19. /* Prototypes
  20. *************/
  21. /* oleutil.c */
  22. extern HRESULT GetClassFileByExtension(LPCTSTR, PCLSID);
  23. extern HRESULT GetReconcilerClassID(LPCTSTR, PCLSID);
  24. extern HRESULT GetCopyHandlerClassID(LPCTSTR, PCLSID);
  25. extern HRESULT GetReplicaNotificationClassID(LPCTSTR, PCLSID);
  26. extern COMPARISONRESULT CompareGUIDs(PCGUID, PCGUID);
  27. extern TWINRESULT TranslateHRESULTToTWINRESULT(HRESULT);
  28. #ifdef DEBUG
  29. extern BOOL IsValidPCINotifyReplica(PCINotifyReplica);
  30. extern BOOL IsValidPCIReconcileInitiator(PCIReconcileInitiator);
  31. #endif