home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / oleaut / spoly / spoly.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  1.8 KB  |  78 lines

  1. /*** 
  2. *spoly.h - Application-wide definitions
  3. *
  4. *  This is a part of the Microsoft Source Code Samples.
  5. *
  6. *  Copyright (C) 1992-1997 Microsoft Corporation. All rights reserved.
  7. *
  8. *  This source code is only intended as a supplement to Microsoft Development
  9. *  Tools and/or WinHelp documentation.  See these sources for detailed
  10. *  information regarding the Microsoft samples programs.
  11. *
  12. *Purpose:
  13. *
  14. *Implementation Notes:
  15. *
  16. *****************************************************************************/
  17.  
  18. #include "hostenv.h"
  19. #include "resource.h"
  20. #include "clsid.h"
  21.  
  22. #if defined(_MAC)
  23. # define PASCAL pascal
  24. # define STRSTR strstr
  25. #elif defined(WIN32)
  26. # include "statbar.h"
  27. # define STRSTR strstr
  28. #else /* WIN16 */
  29. # include "statbar.h"
  30. # define STRSTR _fstrstr
  31. #endif
  32.  
  33. #ifdef _MAC
  34. # define UNUSED(X) ((void)(void*)&(X))
  35. #else
  36. # define UNUSED(X) (X)
  37. #endif
  38.  
  39. #define DIM(X) (sizeof(X) / sizeof(X[0]))
  40.  
  41. extern "C" void Assert(int, char FAR*, int, char FAR*);
  42. #define ASSERT(X) Assert(X, __FILE__, __LINE__, NULL)
  43. #define ASSERTSZ(X, MSG) Assert(X, __FILE__, __LINE__, MSG)
  44.  
  45.  
  46.  
  47. // Description of a single named parameter.
  48. //
  49. typedef struct tagPARAM_DESC {
  50.     OLECHAR FAR* szName;        // parameter name
  51. } PARAM_DESC;
  52.  
  53. // Description of a single member.
  54. //
  55. typedef struct tagMEMBERDESC {
  56.     OLECHAR FAR* szName;        // member name
  57.     DISPID id;            // member id
  58.     PARAM_DESC FAR* rgpd;    // ptr to array of PARAM_DESCs
  59.     unsigned int cParams;        // number of parameters
  60. } MEMBERDESC;
  61.  
  62. STDAPI
  63. SPolyGetIDsOfNames(
  64.     MEMBERDESC FAR* pmd,
  65.     unsigned int cMethods,
  66.     OLECHAR FAR* FAR* rgszNames,
  67.     unsigned int cNames,
  68.     LCID lcid,
  69.     DISPID FAR* rgid);
  70.  
  71.  
  72. STDAPI InitOle();
  73. STDAPI UninitOle();
  74. STDAPI Revoke();
  75.  
  76. void IncObjectCount();
  77. void DecObjectCount();
  78.