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.

180 lines
3.7 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 2000.
  5. //
  6. // File: cumicurs.hxx
  7. //
  8. // Contents: Header file for CUmiCursor.
  9. //
  10. // History: 03-16-00 SivaramR Created.
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef __CUMICURS_H__
  14. #define __CUMICURS_H__
  15. class CUmiCursor : INHERIT_TRACKING,
  16. public IUmiCursor
  17. {
  18. public:
  19. CUmiCursor(void);
  20. ~CUmiCursor(void);
  21. DECLARE_STD_REFCOUNTING
  22. HRESULT FInit(IUnknown *pCont, CWinNTCredentials *pCredentials);
  23. STDMETHODIMP QueryInterface(
  24. REFIID iid,
  25. LPVOID *ppInterface
  26. );
  27. STDMETHODIMP GetLastStatus(
  28. ULONG uFlags,
  29. ULONG *puSpecificStatus,
  30. REFIID riid,
  31. LPVOID *pStatusObj
  32. );
  33. STDMETHODIMP GetInterfacePropList(
  34. ULONG uFlags,
  35. IUmiPropList **pPropList
  36. );
  37. STDMETHODIMP SetIID(
  38. REFIID riid
  39. );
  40. STDMETHODIMP Reset(void);
  41. STDMETHODIMP Next(
  42. ULONG uNumRequested,
  43. ULONG *puNumReturned,
  44. LPVOID *ppObjects
  45. );
  46. STDMETHODIMP Count(
  47. ULONG *puNumObjects
  48. );
  49. STDMETHODIMP Previous(
  50. ULONG uFlags,
  51. LPVOID *pObj
  52. );
  53. static HRESULT CreateCursor(
  54. CWinNTCredentials *pCredentials,
  55. IUnknown *pCont,
  56. REFIID iid,
  57. LPVOID *ppInterface
  58. );
  59. // Methods of IUmiPropList - return error as there are no object
  60. // properties on a cursor object.
  61. STDMETHODIMP Put(
  62. LPCWSTR pszName,
  63. ULONG uFlags,
  64. UMI_PROPERTY_VALUES *pProp
  65. )
  66. {
  67. SetLastStatus(UMI_E_NOTIMPL);
  68. RRETURN(UMI_E_NOTIMPL);
  69. }
  70. STDMETHODIMP Get(
  71. LPCWSTR pszName,
  72. ULONG uFlags,
  73. UMI_PROPERTY_VALUES **ppProp
  74. )
  75. {
  76. SetLastStatus(UMI_E_NOTIMPL);
  77. RRETURN(UMI_E_NOTIMPL);
  78. }
  79. STDMETHODIMP GetAs(
  80. LPCWSTR pszName,
  81. ULONG uFlags,
  82. ULONG uCoercionType,
  83. UMI_PROPERTY_VALUES **ppProp
  84. )
  85. {
  86. SetLastStatus(UMI_E_NOTIMPL);
  87. RRETURN(UMI_E_NOTIMPL);
  88. }
  89. STDMETHODIMP FreeMemory(
  90. ULONG uReserved,
  91. LPVOID pMem
  92. )
  93. {
  94. SetLastStatus(UMI_E_NOTIMPL);
  95. RRETURN(UMI_E_NOTIMPL);
  96. }
  97. STDMETHODIMP GetAt(
  98. LPCWSTR pszName,
  99. ULONG uFlags,
  100. ULONG uBufferLength,
  101. LPVOID pExistingMem
  102. )
  103. {
  104. SetLastStatus(UMI_E_NOTIMPL);
  105. RRETURN(UMI_E_NOTIMPL);
  106. }
  107. STDMETHODIMP GetProps(
  108. LPCWSTR *pszNames,
  109. ULONG uNameCount,
  110. ULONG uFlags,
  111. UMI_PROPERTY_VALUES **pProps
  112. )
  113. {
  114. SetLastStatus(UMI_E_NOTIMPL);
  115. RRETURN(UMI_E_NOTIMPL);
  116. }
  117. STDMETHODIMP PutProps(
  118. LPCWSTR *pszNames,
  119. ULONG uNameCount,
  120. ULONG uFlags,
  121. UMI_PROPERTY_VALUES *pProps
  122. )
  123. {
  124. SetLastStatus(UMI_E_NOTIMPL);
  125. RRETURN(UMI_E_NOTIMPL);
  126. }
  127. STDMETHODIMP PutFrom(
  128. LPCWSTR pszName,
  129. ULONG uFlags,
  130. ULONG uBufferLength,
  131. LPVOID pExistingMem
  132. )
  133. {
  134. SetLastStatus(UMI_E_NOTIMPL);
  135. RRETURN(UMI_E_NOTIMPL);
  136. }
  137. STDMETHODIMP Delete(
  138. LPCWSTR pszName,
  139. ULONG uFlags
  140. )
  141. {
  142. SetLastStatus(UMI_E_NOTIMPL);
  143. RRETURN(UMI_E_NOTIMPL);
  144. }
  145. private:
  146. void SetLastStatus(ULONG ulStatus);
  147. HRESULT GetFilter(VARIANT *pvFilter);
  148. IUmiPropList *m_pIUmiPropList;
  149. ULONG m_ulErrorStatus;
  150. IID *m_pIID;
  151. IUnknown *m_pUnkInner;
  152. IEnumVARIANT *m_pEnumerator;
  153. CWinNTCredentials* m_pCreds;
  154. };
  155. #endif // __CUMICURS_H__