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.

79 lines
2.0 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: csrvapp.hxx
  4. //
  5. // Contents: CTestServerApp declarations &
  6. // miscellaneous tidbits.
  7. //
  8. // History: 24-Nov-92 DeanE Created
  9. //
  10. //---------------------------------------------------------------------
  11. #ifndef __CSRVAPP_HXX__
  12. #define __CSRVAPP_HXX__
  13. // #include <com.hxx>
  14. #define LOG_ABORT -1
  15. #define LOG_PASS 1
  16. #define LOG_FAIL 0
  17. // Application Window messages
  18. #define WM_RUNTEST (WM_USER + 1)
  19. #define WM_REPORT (WM_USER + 2)
  20. // WM_REPORT wParam codes
  21. #define MB_SHOWVERB 0x0001
  22. #define MB_PRIMVERB 0x0002
  23. // Global variables
  24. extern HWND g_hwndMain;
  25. // Forward declarations
  26. class FAR CDataObject;
  27. class FAR CPersistStorage;
  28. class FAR COleObject;
  29. class FAR CTestEmbedCF;
  30. //+-------------------------------------------------------------------
  31. // Class: CTestServerApp
  32. //
  33. // Synopsis: Class that holds application-wide data and methods
  34. //
  35. // Methods: InitApp
  36. // CloseApp
  37. // GetEmbeddedFlag
  38. //
  39. // History: 17-Dec-92 DeanE Created
  40. //--------------------------------------------------------------------
  41. class FAR CTestServerApp
  42. {
  43. public:
  44. // Constructor/Destructor
  45. CTestServerApp();
  46. ~CTestServerApp();
  47. SCODE InitApp (LPSTR lpszCmdline);
  48. SCODE CloseApp (void);
  49. BOOL GetEmbeddedFlag (void);
  50. ULONG IncEmbeddedCount(void);
  51. ULONG DecEmbeddedCount(void);
  52. private:
  53. IClassFactory *_pteClassFactory;
  54. ULONG _cEmbeddedObjs; // Count of embedded objects this server
  55. // is controlling now
  56. DWORD _dwRegId; // OLE registration ID
  57. BOOL _fRegistered; // TRUE if srv was registered w/OLE
  58. BOOL _fInitialized; // TRUE if OleInitialize was OK
  59. BOOL _fEmbedded; // TRUE if OLE started us at the request
  60. // of an embedded obj in a container app
  61. };
  62. #endif // __CSRVAPP_HXX__