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.

175 lines
3.9 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 2000.
  5. //
  6. // File: cumiconn.hxx
  7. //
  8. // Contents: Header file for CUmiConnection.
  9. //
  10. // History: 03-06-00 SivaramR Created.
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef __CUMICONN_H__
  14. #define __CUMICONN_H__
  15. class CUmiConnection : INHERIT_TRACKING,
  16. public IUmiConnection
  17. {
  18. public:
  19. CUmiConnection(void);
  20. ~CUmiConnection(void);
  21. HRESULT FInit(void);
  22. DECLARE_STD_REFCOUNTING
  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 Open(
  38. IUmiURL *pURL,
  39. ULONG uFlags,
  40. REFIID TargetIID,
  41. LPVOID *ppInterface
  42. );
  43. static
  44. HRESULT CUmiConnection::CreateConnection(
  45. REFIID iid,
  46. LPVOID *ppInterface
  47. );
  48. // Methods of IUmiPropList - return error as there are no object
  49. // properties on a connection object.
  50. STDMETHODIMP Put(
  51. LPCWSTR pszName,
  52. ULONG uFlags,
  53. UMI_PROPERTY_VALUES *pProp
  54. )
  55. {
  56. SetLastStatus(UMI_E_NOTIMPL);
  57. RRETURN(UMI_E_NOTIMPL);
  58. }
  59. STDMETHODIMP Get(
  60. LPCWSTR pszName,
  61. ULONG uFlags,
  62. UMI_PROPERTY_VALUES **ppProp
  63. )
  64. {
  65. SetLastStatus(UMI_E_NOTIMPL);
  66. RRETURN(UMI_E_NOTIMPL);
  67. }
  68. STDMETHODIMP GetAs(
  69. LPCWSTR pszName,
  70. ULONG uFlags,
  71. ULONG uCoercionType,
  72. UMI_PROPERTY_VALUES **ppProp
  73. )
  74. {
  75. SetLastStatus(UMI_E_NOTIMPL);
  76. RRETURN(UMI_E_NOTIMPL);
  77. }
  78. STDMETHODIMP FreeMemory(
  79. ULONG uReserved,
  80. LPVOID pMem
  81. )
  82. {
  83. SetLastStatus(UMI_E_NOTIMPL);
  84. RRETURN(UMI_E_NOTIMPL);
  85. }
  86. STDMETHODIMP GetAt(
  87. LPCWSTR pszName,
  88. ULONG uFlags,
  89. ULONG uBufferLength,
  90. LPVOID pExistingMem
  91. )
  92. {
  93. SetLastStatus(UMI_E_NOTIMPL);
  94. RRETURN(UMI_E_NOTIMPL);
  95. }
  96. STDMETHODIMP GetProps(
  97. LPCWSTR *pszNames,
  98. ULONG uNameCount,
  99. ULONG uFlags,
  100. UMI_PROPERTY_VALUES **pProps
  101. )
  102. {
  103. SetLastStatus(UMI_E_NOTIMPL);
  104. RRETURN(UMI_E_NOTIMPL);
  105. }
  106. STDMETHODIMP PutProps(
  107. LPCWSTR *pszNames,
  108. ULONG uNameCount,
  109. ULONG uFlags,
  110. UMI_PROPERTY_VALUES *pProps
  111. )
  112. {
  113. SetLastStatus(UMI_E_NOTIMPL);
  114. RRETURN(UMI_E_NOTIMPL);
  115. }
  116. STDMETHODIMP PutFrom(
  117. LPCWSTR pszName,
  118. ULONG uFlags,
  119. ULONG uBufferLength,
  120. LPVOID pExistingMem
  121. )
  122. {
  123. SetLastStatus(UMI_E_NOTIMPL);
  124. RRETURN(UMI_E_NOTIMPL);
  125. }
  126. STDMETHODIMP Delete(
  127. LPCWSTR pszName,
  128. ULONG uFlags
  129. )
  130. {
  131. SetLastStatus(UMI_E_NOTIMPL);
  132. RRETURN(UMI_E_NOTIMPL);
  133. }
  134. private:
  135. void SetLastStatus(ULONG ulStatus);
  136. HRESULT GetUserName(LPWSTR *ppszUserName);
  137. HRESULT GetPassword(LPWSTR *ppszPassword);
  138. HRESULT GetBindFlags(DWORD *pdwBindFlags);
  139. HRESULT CheckObject(
  140. IUnknown *pUnknown,
  141. DWORD dwNumComps,
  142. LPWSTR *ppszClasses
  143. );
  144. IUmiPropList *m_pIUmiPropList;
  145. CUmiPropList *m_pCUmiPropList;
  146. ULONG m_ulErrorStatus;
  147. IADsOpenDSObject *m_pIADsOpenDSObj;
  148. BOOL m_fAlreadyOpened;
  149. LPWSTR m_pszComputerName;
  150. LPWSTR m_pszDomainName;
  151. };
  152. #endif // __CUMICONN_H__