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.

73 lines
1.8 KiB

  1. /*
  2. * OPOSSERV.H
  3. *
  4. *
  5. *
  6. *
  7. *
  8. *
  9. */
  10. class COPOSService : public IOPOSService
  11. {
  12. private:
  13. DWORD m_refCount;
  14. DWORD m_serverLockCount;
  15. public:
  16. COPOSService();
  17. ~COPOSService();
  18. /*
  19. * IUnknown methods
  20. */
  21. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR* ppvObj);
  22. STDMETHODIMP_(ULONG) AddRef(void);
  23. STDMETHODIMP_(ULONG) Release(void);
  24. /*
  25. * IClassFactory methods
  26. */
  27. STDMETHODIMP CreateInstance(LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppvObj);
  28. STDMETHODIMP LockServer(int lock);
  29. /*
  30. * IOPOSService methods
  31. */
  32. STDMETHODIMP_(LONG) CheckHealth(LONG Level);
  33. STDMETHODIMP_(LONG) Claim(LONG Timeout);
  34. STDMETHODIMP_(LONG) ClearInput() ;
  35. STDMETHODIMP_(LONG) ClearOutput();
  36. STDMETHODIMP_(LONG) Close();
  37. STDMETHODIMP_(LONG) COFreezeEvents(BOOL Freeze);
  38. STDMETHODIMP_(LONG) DirectIO(LONG Command, LONG* pData, BSTR* pString);
  39. STDMETHODIMP_(LONG) OpenService(BSTR DeviceClass, BSTR DeviceName, LPDISPATCH pDispatch);
  40. // STDMETHODIMP_(LONG) Release(); // BUGBUG - override IUnknown ?
  41. STDMETHODIMP_(LONG) GetPropertyNumber(LONG PropIndex);
  42. STDMETHODIMP_(BSTR) GetPropertyString(LONG PropIndex);
  43. STDMETHODIMP_(void) SetPropertyNumber(LONG PropIndex, LONG Number);
  44. STDMETHODIMP_(void) SetPropertyString(LONG PropIndex, BSTR String);
  45. // BUGBUG - + Get/Set type methods
  46. // BUGBUG - + events
  47. };
  48. #define ASSERT(fact) if (!(fact)){ \
  49. Report("Assertion '" #fact "' failed in file " __FILE__ " line ", __LINE__); \
  50. }
  51. /*
  52. * Function prototypes
  53. */
  54. VOID Report(LPSTR szMsg, DWORD num);
  55. BOOLEAN InitServer();
  56. void ShutdownServer();