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.

56 lines
1.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: nocairo.hxx
  7. //
  8. // Contents: Stuff we need defined for ADs to run sans Cairo
  9. //
  10. // History:
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef _NOCAIRO_HXX_
  14. #define _NOCAIRO_HXX_
  15. #define VT_TYPEMASK 0x3ff
  16. // normally defined in shelitfs.h, which we're not including
  17. // for non-Cairo drop of ADs.
  18. #define S_CANCELLED MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_NULL,2)
  19. #if DBG==1
  20. typedef BOOL (* ALLOC_HOOK)(size_t nSize);
  21. ALLOC_HOOK MemSetAllocHook( ALLOC_HOOK pfnAllocHook );
  22. #endif
  23. HRESULT
  24. MemAlloc(ULONG cb, LPVOID FAR* ppv);
  25. HRESULT
  26. MemFree(LPVOID pv);
  27. HRESULT
  28. MemAllocLinked ( void *pvRootBlock, unsigned long ulSize, void ** ppv );
  29. void *
  30. ADsAlloc(size_t size);
  31. void
  32. ADsFree(void * pv);
  33. inline void * __cdecl
  34. operator new(size_t size)
  35. {
  36. return AllocADsMem(size);
  37. }
  38. inline void __cdecl
  39. operator delete(void * pv)
  40. {
  41. FreeADsMem(pv);
  42. }
  43. #endif // ifndef _NOCAIRO_HXX_