home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / WOLEDISP.HPP < prev    next >
C/C++ Source or Header  |  1997-01-15  |  4KB  |  122 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1996, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. #ifndef _WOLEDISP_HPP_INCLUDED
  12. #define _WOLEDISP_HPP_INCLUDED
  13.  
  14. #ifndef _WNO_PRAGMA_PUSH
  15. #pragma pack(push,8);
  16. #pragma enum int;
  17. #endif
  18.  
  19. #ifndef _WOLETYPE_HPP_INCLUDED
  20. #  include "woletype.hpp"
  21. #endif
  22. #ifndef _WOLEIFAM_HPP_INCLUDED
  23. #  include "woleifam.hpp"
  24. #endif
  25.  
  26. struct WOleAutomationObjectRegistryDataBlock {
  27.     const WCLSID  *_typeLib;
  28.     WInt           _toolboxBitmap32;
  29. };
  30.  
  31. class WCMCLASS WOleAutomationObjectRegistryData : public WOleInterfaceFamilyRegistryData
  32. {
  33.     public:
  34.         WOleAutomationObjectRegistryData( const WCLSID & clsid, void * );
  35.         ~WOleAutomationObjectRegistryData( void );
  36.  
  37.         // Properties
  38.         WBool SetRegistryDataBlock( WOleAutomationObjectRegistryDataBlock * );
  39.         WOleAutomationObjectRegistryDataBlock *GetRegistryDataBlock( void ) const;
  40.  
  41.         // Self Registration
  42.         virtual WBool Register( WApplication *application );
  43.         virtual WBool Unregister( WApplication *application );
  44. };
  45.  
  46. #define WOleDefineAutomationObject( n, c, c_id, rdb ) \
  47.     static WOleAutomationObjectRegistryData n ## _WOleAutoRegistryData( c_id, &rdb );
  48.  
  49. /*************************************************************************
  50.  *
  51.  * WOleAutomationObject -- Ole Automation interface family
  52.  *
  53.  *
  54.  *   Events:
  55.  *
  56.  *
  57.  *************************************************************************/
  58.  
  59. class WOleISupportErrorInfo;
  60. class WOleIProvideClassInfo2;
  61.  
  62. class WCMCLASS WOleAutomationObject : public WOleInterfaceFamily
  63. {
  64.     WDeclareSubclass( WOleAutomationObject, WOleInterfaceFamily );
  65.  
  66.     public:
  67.  
  68.     /**********************************************************
  69.      * Constructors and Destructors
  70.      *********************************************************/
  71.         WOleAutomationObject( WOleServerObject *serverObject );
  72.         virtual ~WOleAutomationObject();
  73.  
  74.     /**************************************************************
  75.      * Properties
  76.      **************************************************************/
  77.  
  78.         // Dispatch Interface
  79.         WBool SetDispatchInterface( WPIDispatch dispatchInterface );
  80.         WPIDispatch GetDispatchInterface( void ) const;
  81.  
  82.         // IID
  83.         WBool SetIID( const WIID & guid );
  84.         WIID GetIID( void ) const;
  85.  
  86.         // IsIDispatch
  87.         WBool SetIsIDispatch( WBool );
  88.         WBool GetIsIDispatch( void );
  89.  
  90.     /**************************************************************
  91.      * Methods
  92.      **************************************************************/
  93.  
  94.         // overrides
  95.         virtual WBool QueryInterface( const WCLSID & clsid, void **iface );
  96.  
  97.     /**********************************************************
  98.      * Operators
  99.      *********************************************************/
  100.  
  101.     /**********************************************************
  102.      * Data Members
  103.      *********************************************************/
  104.  
  105.     protected:
  106.         WBool                   _isIDispatch;
  107.         WPIDispatch             _dispatchInterface;
  108.         WOleISupportErrorInfo   *_iSuppErr;
  109.         WOleIProvideClassInfo2  *_pIProvideClassInfo2;
  110.         WIID                    _iid;
  111.  
  112. };
  113.  
  114.     
  115. #ifndef _WNO_PRAGMA_PUSH
  116. #pragma enum pop;
  117. #pragma pack(pop);
  118. #endif
  119.  
  120. #endif // _WOLEDISP_HPP_INCLUDED
  121.  
  122.