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.

109 lines
2.6 KiB

  1. class CNDSNamespace;
  2. class CNDSNamespace : INHERIT_TRACKING,
  3. public CCoreADsObject,
  4. public ISupportErrorInfo,
  5. public IADsContainer,
  6. public IADs,
  7. public IADsOpenDSObject,
  8. public IADsPathnameProvider
  9. {
  10. public:
  11. /* IUnknown methods */
  12. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  13. DECLARE_STD_REFCOUNTING
  14. DECLARE_IDispatch_METHODS
  15. DECLARE_ISupportErrorInfo_METHODS
  16. DECLARE_IADs_METHODS
  17. DECLARE_IADsContainer_METHODS
  18. DECLARE_IADsOpenDSObject_METHODS
  19. CNDSNamespace::CNDSNamespace();
  20. CNDSNamespace::~CNDSNamespace();
  21. STDMETHOD(ParsePath)(THIS_ BSTR bstrPath, DWORD dwType, PPATH_OBJECTINFO pObjectInfo);
  22. STDMETHOD(ConstructPath)(THIS_ PPATH_OBJECTINFO pObjectInfo, DWORD dwType, DWORD dwFlag, DWORD dwEscapedMode, BSTR *pbstrPath);
  23. static
  24. HRESULT
  25. CNDSNamespace::CreateNamespace(
  26. BSTR Parent,
  27. BSTR NamespaceName,
  28. CCredentials& Credentials,
  29. DWORD dwObjectState,
  30. REFIID riid,
  31. void **ppvObj
  32. );
  33. static
  34. HRESULT
  35. CNDSNamespace::AllocateNamespaceObject(
  36. CCredentials& Credentials,
  37. CNDSNamespace ** ppNamespace
  38. );
  39. static
  40. HRESULT
  41. CNDSNamespace::SetObjInfoComponents(OBJECTINFO *pObjectInfo,
  42. PATH_OBJECTINFO *pObjectInfoTarget);
  43. static
  44. void
  45. CNDSNamespace::FreeObjInfoComponents(
  46. PATH_OBJECTINFO *pObjectInfo
  47. );
  48. void
  49. CNDSNamespace::SetComponent(
  50. LPWSTR szReturn,
  51. DWORD cComponents,
  52. BOOL fEscaped
  53. );
  54. HRESULT
  55. CNDSNamespace::SetComponents(
  56. LPWSTR szReturn,
  57. BOOLEAN fIsWindowsPath,
  58. LPWSTR chSeparator,
  59. DWORD dwType,
  60. BOOL fEscaped
  61. );
  62. STDMETHODIMP
  63. CNDSNamespace::GetEscapedElement(
  64. LONG lnReserved,
  65. BSTR bstrInStr,
  66. BSTR* pbstrOutStr
  67. );
  68. protected:
  69. VARIANT _vFilter;
  70. CDispatchMgr *_pDispMgr;
  71. PPATH_OBJECTINFO _pObjectInfo; // PathCracker pathinfo
  72. BOOLEAN _fNamingAttribute; // PathCracker naming attribute
  73. CCredentials _Credentials;
  74. };
  75. enum {
  76. ADS_COMPONENT_LEAF,
  77. ADS_COMPONENT_DN,
  78. ADS_COMPONENT_PARENT
  79. };