Leaked source code of windows server 2003
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.

70 lines
1.1 KiB

  1. #include "common.hpp"
  2. //QueryInterface
  3. STDMETHODIMP CDirectInputConfigUITest::QueryInterface(REFIID iid, LPVOID* ppv)
  4. {
  5. //null the out param
  6. *ppv = NULL;
  7. if ((iid == IID_IUnknown)
  8. //@@BEGIN_MSINTERNAL
  9. #ifdef DDKBUILD
  10. #ifdef DBG
  11. || (iid == IID_IDirectInputConfigUITest)
  12. #endif
  13. #endif
  14. //@@END_MSINTERNAL
  15. )
  16. {
  17. *ppv = this;
  18. AddRef();
  19. return S_OK;
  20. }
  21. return E_NOINTERFACE;
  22. }
  23. //AddRef
  24. STDMETHODIMP_(ULONG) CDirectInputConfigUITest::AddRef()
  25. {
  26. return InterlockedIncrement(&m_cRef);
  27. }
  28. //Release
  29. STDMETHODIMP_(ULONG) CDirectInputConfigUITest::Release()
  30. {
  31. if (InterlockedDecrement(&m_cRef) == 0)
  32. {
  33. delete this;
  34. return 0;
  35. }
  36. return m_cRef;
  37. }
  38. //TestConfigUI
  39. STDMETHODIMP CDirectInputConfigUITest::TestConfigUI(LPTESTCONFIGUIPARAMS params)
  40. {
  41. return RunDFTest(params);
  42. }
  43. //constructor
  44. CDirectInputConfigUITest::CDirectInputConfigUITest()
  45. {
  46. //set ref count
  47. m_cRef = 1;
  48. }
  49. //destructor
  50. CDirectInputConfigUITest::~CDirectInputConfigUITest()
  51. {
  52. // not necessary to cleanup action format here
  53. }