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.

62 lines
962 B

  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) || (iid == IID_IDirectInputConfigUITest))
  8. {
  9. *ppv = this;
  10. AddRef();
  11. return S_OK;
  12. }
  13. return E_NOINTERFACE;
  14. }
  15. //AddRef
  16. STDMETHODIMP_(ULONG) CDirectInputConfigUITest::AddRef()
  17. {
  18. return InterlockedIncrement(&m_cRef);
  19. }
  20. //Release
  21. STDMETHODIMP_(ULONG) CDirectInputConfigUITest::Release()
  22. {
  23. if (InterlockedDecrement(&m_cRef) == 0)
  24. {
  25. delete this;
  26. return 0;
  27. }
  28. return m_cRef;
  29. }
  30. //TestConfigUI
  31. STDMETHODIMP CDirectInputConfigUITest::TestConfigUI(LPTESTCONFIGUIPARAMS params)
  32. {
  33. return RunDFTest(params);
  34. }
  35. //constructor
  36. CDirectInputConfigUITest::CDirectInputConfigUITest()
  37. {
  38. //set ref count
  39. m_cRef = 1;
  40. }
  41. //destructor
  42. CDirectInputConfigUITest::~CDirectInputConfigUITest()
  43. {
  44. // not necessary to cleanup action format here
  45. }