home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / hpp.z / WOLECFAC.HPP < prev    next >
C/C++ Source or Header  |  1996-12-05  |  4KB  |  117 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1994, 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. /*************************************************************************
  12.  *
  13.  * WOleClassManager -- Ole Class Manager
  14.  *
  15.  *
  16.  *   Events:
  17.  *
  18.  *
  19.  *************************************************************************/
  20.  
  21. #ifndef _WOLECFAC_HPP_INCLUDED
  22. #define _WOLECFAC_HPP_INCLUDED
  23.  
  24. #ifndef _WNO_PRAGMA_PUSH
  25. #pragma pack(push,8);
  26. #pragma enum int;
  27. #endif
  28.  
  29. #ifndef _WOLETYPE_HPP_INCLUDED
  30. #  include "woletype.hpp"
  31. #endif
  32.  
  33. // forward class declarations
  34. class WApplication;
  35. class WOleClassManager;
  36. class WOleClassManager_IClassFac;
  37.  
  38. // the following is definitions of WOleClassManager
  39.  
  40. class WCMCLASS WOleClassManager : public WEventGenerator {
  41.     WDeclareSubclass( WOleClassManager, WEventGenerator );
  42.  
  43.     friend class WOleClassManager_IClassFac;
  44.  
  45.     public:
  46.  
  47.         /**********************************************************
  48.          * Constructors and Destructors
  49.          *********************************************************/
  50.  
  51.         WOleClassManager( WBool isExe );
  52.  
  53.         virtual ~WOleClassManager();
  54.  
  55.     public:
  56.  
  57.         /**************************************************************
  58.          * Properties
  59.          **************************************************************/
  60.  
  61.         // User Mode
  62.         WBool SetUserMode( WBool userMode );
  63.         WBool GetUserMode( void ) const;
  64.  
  65.         /**************************************************************
  66.          * Methods
  67.          **************************************************************/
  68.  
  69.         WULong RegisterServer( WApplication *application );
  70.         WULong UnregisterServer( void );
  71.         WULong CanUnloadNow( void );
  72.  
  73.         WBool CheckUnloadExe( void );
  74.         WBool RegisterClassObjects( void );
  75.         WBool RevokeClassObjects( void );
  76.  
  77.         static void IncrementObjectCount( void );
  78.         static void DecrementObjectCount( void );
  79.  
  80.         /**************************************************************
  81.          * Item Properties
  82.          **************************************************************/
  83.  
  84.         WULong GetClassObject( const WCLSID & rclsid, const WIID & riid, void **ppv );
  85.  
  86.     protected:
  87.  
  88.     /**************************************************************
  89.      * Internal Methods
  90.      **************************************************************/
  91.  
  92.         WBool RegisteredListAdd( WULong dwReg );
  93.  
  94.     /**********************************************************
  95.      * Data Members
  96.      *********************************************************/
  97.     
  98.     protected:
  99.         static WULong _lockCount;
  100.         static WULong _objCount;
  101.  
  102.         WBool           _isExe;
  103.         WBool           _userMode;
  104.         WULong          _regCount;
  105.         WULong          _regSize;
  106.         WULong          *_regList;
  107.  
  108. };
  109.  
  110. #ifndef _WNO_PRAGMA_PUSH
  111. #pragma enum pop;
  112. #pragma pack(pop);
  113. #endif
  114.  
  115. #endif // _WOLECFAC_HPP_INCLUDED
  116.  
  117.