TIBROWSE.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:3k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /*** 
  2. *tibrowse.h
  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. #if defined(_MAC)
  18. #if defined(_MSC_VER)
  19. # include <values.h>
  20. # include <types.h>
  21. # include <string.h>
  22. # include <quickdra.h>
  23. # include <fonts.h>
  24. # include <events.h>
  25. # include <resource.h>
  26. # include <menus.h>
  27. # include <lists.h>
  28. # include <textedit.h>
  29. # include <dialogs.h>
  30. # include <desk.h>
  31. # include <toolutil.h>
  32. # include <memory.h>
  33. # include <files.h>
  34. # include <osutils.h>
  35. # include <osevents.h>
  36. # include <diskinit.h>
  37. # include <packages.h>
  38. # include <traps.h>
  39. # include <AppleEve.h>
  40. # include <standard.h>
  41. #else //_MSC_VER
  42. # include <values.h>
  43. # include <types.h>
  44. # include <strings.h>
  45. # include <quickdraw.h>
  46. # include <fonts.h>
  47. # include <events.h>
  48. # include <resources.h>
  49. # include <windows.h>
  50. # include <menus.h>
  51. # include <lists.h>
  52. # include <textedit.h>
  53. # include <dialogs.h>
  54. # include <desk.h>
  55. # include <toolutils.h>
  56. # include <memory.h>
  57. # include <files.h>
  58. # include <osutils.h>
  59. # include <osevents.h>
  60. # include <diskinit.h>
  61. # include <packages.h>
  62. # include <traps.h>
  63. # include <AppleEvents.h>
  64. # include <StandardFile.h>
  65. #endif //_MSC_VER
  66. # include <ole2.h>
  67. # include <olenls.h>
  68. # include <dispatch.h>
  69. #elif defined(WIN32)
  70. # include <windows.h>
  71. # include <commdlg.h>
  72. #else /* WIN16 */
  73. # include <windows.h>
  74. # include <commdlg.h>
  75. # include <ole2.h>
  76. # include <olenls.h>
  77. # include <dispatch.h>
  78. #endif
  79. #include "resource.h"
  80. #ifdef WIN32
  81. # define EXPORT
  82. #else
  83. # define EXPORT _export
  84. #endif
  85. #ifdef _MAC
  86. # define UNUSED(X) ((void)(void*)&(X))
  87. #else
  88. # define UNUSED(X) (X)
  89. #endif
  90. #define DIM(X) (sizeof(X) / sizeof(X[0]))
  91. void AssertFail(char FAR*, int);
  92. #define ASSERT(X) if (!(X)) { AssertFail(__FILE__, __LINE__); } else {}
  93. #define CHECKRESULT(X) 
  94.   {HRESULT hresult = (X); 
  95.     if(hresult != NOERROR && FAILED(GetScode(hresult))) MethodError(hresult); }
  96. HRESULT OpenFile(BSTR FAR* pbstrFileName);
  97. void    OpenTypeLib(char FAR*);
  98. void    SetSelectedType(unsigned long);
  99. void    FillMemberList(ITypeInfo FAR *, TYPEATTR FAR *, int cltid);
  100. void    SetSelectedMember(unsigned long); 
  101. void    SetSelectedParam(unsigned long dwIndex);
  102. void    UpdateMemberInfo(MEMBERID memid);                   
  103. void    AssertFail(char FAR*, int);
  104. void    MethodError(HRESULT hresult);                   
  105. void    Cleanup(void);                   
  106. void    MemFree(void FAR*);
  107. #ifdef _PPCMAC
  108. #define ROUTINE_DESC(proc)              g_rd##proc
  109. #define DECLARE_ROUTINE_DESC(type,proc) static type ROUTINE_DESC(proc)=0
  110. #define INIT_ROUTINE_DESC(init,proc)    { if (!ROUTINE_DESC(proc)) ROUTINE_DESC(proc)=init(proc); }
  111. #else  // _PPCMAC
  112. #define ROUTINE_DESC(proc)              proc
  113. #define INIT_ROUTINE_DESC(init,proc)
  114. #define DECLARE_ROUTINE_DESC(type,proc)
  115. #endif // _PPCMAC