home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / msj / v10n08 / oleq0895.exe / ARB.H < prev    next >
C/C++ Source or Header  |  1995-08-01  |  903b  |  39 lines

  1. #ifndef _ARB_H
  2. #define _ARB_H
  3.  
  4. #include "SSDA.h"
  5.  
  6. extern const UINT WM_ACTIVECHANGING;
  7.  
  8. class Arbitrator {
  9. public:
  10.  
  11.     Arbitrator(REFCLSID rclsid, LPCTSTR szName);
  12.     ~Arbitrator(void);
  13.  
  14. // register and revoke an object
  15.     void RegisterObject(LPUNKNOWN punk);
  16.     void RevokeObject(LPUNKNOWN punk);
  17.  
  18. // inform arbitrator when thread is going UI foreground/background
  19.     void SuspendApp(void);
  20.     void ResumeApp(void);
  21.  
  22. // inform arbitrator that WM_ACTIVECHANGING message
  23.     void ActiveChanging(void);
  24.  
  25. private:
  26. // used internally to broadcast WM_ACTIVECHANGING message
  27.     void PostChangeMessage(void);
  28.  
  29.     DWORD m_dwReg;          // the key used by RegisterActiveObject
  30.     BOOL  m_bIsRegistered;  // is our object actually registered?
  31.     LPUNKNOWN m_punk;       // our object
  32.     const CLSID m_clsid;    // our CLSID
  33.  
  34.     SharedSortedDWORDArray m_threadIds;  // the thread id array
  35. };
  36.  
  37.  
  38. #endif
  39.