home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / initguid.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  2KB  |  45 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * initguid.h -  Definitions for controlling GUID initialization               *
  4. *                                                                             *
  5. *               OLE Version 2.0                                               *
  6. *                                                                             *
  7. *               Copyright 1992 - 1998 Microsoft Corp. All rights reserved. *
  8. *                                                                             *
  9. \*****************************************************************************/
  10.  
  11. // Include after compobj.h to enable GUID initialization.  This
  12. //              must be done once per exe/dll.
  13. //
  14. // After this file, include one or more of the GUID definition files.
  15. //
  16. // NOTE: ole2.lib contains references to all GUIDs defined by OLE.
  17.  
  18. #ifndef DEFINE_GUID
  19. #error initguid: must include objbase.h first.
  20. #endif
  21.  
  22. #undef DEFINE_GUID
  23.  
  24. #ifdef _MAC
  25. #define __based(a)
  26. #endif
  27.  
  28. #ifdef _WIN32
  29. #define __based(a)
  30. #endif
  31.  
  32. #ifdef __TURBOC__
  33. #define __based(a)
  34. #endif
  35.  
  36. #ifndef _MAC
  37. #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
  38.     EXTERN_C const GUID __based(__segname("_CODE")) name \
  39.                     = { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }
  40. #else
  41. #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
  42.     EXTERN_C const GUID name \
  43.                     = { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }
  44. #endif
  45.