home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / TextEdit / guidinit.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-15  |  1.8 KB  |  48 lines  |  [TEXT/CWIE]

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * guidInit.cpp    Guidinit code                                                  *
  4. *                                                                             *
  5. *               OLE Version 2.0                                               *
  6. *                                                                             *
  7. *               Copyright (c) 1992-1996, Microsoft Corp. All rights reserved. *
  8. *                                                                              *
  9. *    By default the #define for  the DEFINE_GUID macro in compobj.h on the Mac *
  10. *    defines a macro that turns this:                                              *
  11.     DEFINE_OLEGUID(IID_IEnumUnknown, 0x00000100, 0, 0);
  12.     
  13.     into the following declaration
  14.     
  15.     extern "C" const GUID IID_IEnumUnknown;
  16.     
  17.     to actually define the GUID (create the data) you need to #define INITGUID
  18.     before you include compobj.h which will cause initguid.h to be included 
  19.     which will then redefine the DEFINE_OLEGUID macro to generate
  20.     
  21.     extern "C" const GUID IID_IEnumUnknown = { 0x00000100, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46 };
  22.     
  23.     If this kind of gross nested macro abuse is considered bad programing style
  24.     I like to remind you that it's done by Microsoft, which is the most successful
  25.     software company in the world so it must be Okay!
  26.  
  27.  
  28. *                                                                             *
  29. \*****************************************************************************/
  30.  
  31. #ifndef FAR
  32.     #define FAR
  33. #endif
  34.  
  35. #define INITGUID
  36. #include <compobj.h>
  37. #include <coguid.h>
  38. #include <oleguid.h>
  39. #include <activexguid.h>
  40. #include <olectlid.h>
  41. #include <ole2.h>
  42. //#include <dispatch.h>
  43. //#include <ServiceProviderGuid.h>
  44. #include <URLMonGuid.h>
  45. #include <ObjectGuid.h>
  46. //#include <DataPathGuid.h>
  47. //#include <ISLGuids.h>
  48. #include <PlatformControlGuid.h>