Source code of Windows XP (NT5)
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.

123 lines
2.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: attest.h
  7. //
  8. // Contents: declarations for upper layer apartment thread test
  9. //
  10. // Classes: CBareFactory
  11. // CATTestIPtrs
  12. //
  13. // Functions:
  14. //
  15. // History: dd-mmm-yy Author Comment
  16. // 04-Jan-95 t-ScottH author
  17. //
  18. //--------------------------------------------------------------------------
  19. #ifndef _ATTEST_H
  20. #define _ATTEST_H
  21. //+-------------------------------------------------------------------------
  22. //
  23. // Class:
  24. //
  25. // Purpose:
  26. //
  27. // Interface:
  28. //
  29. // History: dd-mmm-yy Author Comment
  30. //
  31. // Notes:
  32. //
  33. //--------------------------------------------------------------------------
  34. class CATTestIPtrs
  35. {
  36. public:
  37. CATTestIPtrs();
  38. STDMETHOD(Reset)();
  39. IOleObject *_pOleObject;
  40. IOleCache2 *_pOleCache2;
  41. IDataObject *_pDataObject;
  42. IPersistStorage *_pPersistStorage;
  43. IRunnableObject *_pRunnableObject;
  44. IViewObject2 *_pViewObject2;
  45. IExternalConnection *_pExternalConnection;
  46. IOleLink *_pOleLink;
  47. };
  48. //+-------------------------------------------------------------------------
  49. //
  50. // Class: CBareFactory
  51. //
  52. // Purpose: use as a class factory which doesn't do anything in
  53. // OleCreateEmbeddingHelper API
  54. //
  55. // Interface: IClassFactory
  56. //
  57. // History: dd-mmm-yy Author Comment
  58. // 11-Jan-95 t-ScottH author
  59. //
  60. // Notes:
  61. //
  62. //--------------------------------------------------------------------------
  63. class CBareFactory : public IClassFactory
  64. {
  65. public:
  66. STDMETHOD(QueryInterface) (REFIID iid, LPVOID FAR* ppvObj);
  67. STDMETHOD_(ULONG,AddRef) (void);
  68. STDMETHOD_(ULONG,Release) (void);
  69. STDMETHOD(CreateInstance) (LPUNKNOWN pUnkOuter, REFIID iid,
  70. LPVOID FAR* ppv);
  71. STDMETHOD(LockServer) ( BOOL fLock );
  72. CBareFactory();
  73. private:
  74. ULONG _cRefs;
  75. };
  76. // runs 3 test routines and returns results
  77. void ATTest(void);
  78. // get pointers to interfaces and creates thread to ensure
  79. // interface methods return RPC_E_WRONG_ERROR
  80. HRESULT CreateEHelperQuery(void);
  81. HRESULT LinkObjectQuery(void);
  82. HRESULT GetClipboardQuery(void);
  83. // new thread functions to try interface methods
  84. void LinkObjectTest(void);
  85. void CreateEHTest(void);
  86. void GetClipboardTest(void);
  87. // interface methods with NULL parameters
  88. void OleLinkMethods(void);
  89. void OleObjectMethods(void);
  90. void PersistStorageMethods(void);
  91. void DataObjectMethods(void);
  92. void RunnableObjectMethods(void);
  93. void ViewObject2Methods(void);
  94. void OleCache2Methods(void);
  95. void ExternalConnectionsMethods(void);
  96. #endif //!ATTEST_H
  97.