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.

142 lines
5.2 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: Objects.cpp
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description: Implementation of the CObjects class
  10. //
  11. // Author: tperraut
  12. //
  13. // Revision 02/24/2000 created
  14. //
  15. /////////////////////////////////////////////////////////////////////////////
  16. #include "stdafx.h"
  17. #include "objects.h"
  18. CObjects::CObjects(CSession& CurrentSession)
  19. :m_ObjectsCommandPath(CurrentSession),
  20. m_ObjectsCommandIdentity(CurrentSession),
  21. m_ObjectsCommandDelete(CurrentSession),
  22. m_ObjectsCommandNameParent(CurrentSession),
  23. m_ObjectsCommandGet(CurrentSession),
  24. m_ObjectsCommandInsert(CurrentSession)
  25. {
  26. };
  27. //////////////////////////////////////////////////////////////////////////
  28. // Destructor
  29. //////////////////////////////////////////////////////////////////////////
  30. CObjects::~CObjects()
  31. {
  32. };
  33. //////////////////////////////////////////////////////////////////////////
  34. // GetObject
  35. //////////////////////////////////////////////////////////////////////////
  36. HRESULT CObjects::GetObject(
  37. _bstr_t& Name,
  38. LONG& Identity,
  39. LONG Parent
  40. )
  41. {
  42. return m_ObjectsCommandGet.GetObject(Name, Identity, Parent);
  43. }
  44. //////////////////////////////////////////////////////////////////////////
  45. // GetNextObject
  46. //////////////////////////////////////////////////////////////////////////
  47. HRESULT CObjects::GetNextObject(
  48. _bstr_t& Name,
  49. LONG& Identity,
  50. LONG Parent,
  51. LONG Index
  52. )
  53. {
  54. return m_ObjectsCommandGet.GetObject(
  55. Name,
  56. Identity,
  57. Parent,
  58. Index
  59. );
  60. }
  61. //////////////////////////////////////////////////////////////////////////
  62. // WalkPath
  63. //////////////////////////////////////////////////////////////////////////
  64. void CObjects::WalkPath(
  65. LPCWSTR Path,
  66. LONG& Identity,
  67. LONG Parent // = 1 defined in header
  68. )
  69. {
  70. m_ObjectsCommandPath.WalkPath(Path, Identity, Parent);
  71. }
  72. //////////////////////////////////////////////////////////////////////////
  73. // GetObjectIdentity
  74. //////////////////////////////////////////////////////////////////////////
  75. HRESULT CObjects::GetObjectIdentity(
  76. _bstr_t& Name,
  77. LONG& Parent,
  78. LONG Identity
  79. )
  80. {
  81. return m_ObjectsCommandIdentity.GetObjectIdentity(
  82. Name,
  83. Parent,
  84. Identity
  85. );
  86. }
  87. //////////////////////////////////////////////////////////////////////////
  88. // GetObjectNameParent
  89. //////////////////////////////////////////////////////////////////////////
  90. HRESULT CObjects::GetObjectNameParent(
  91. const _bstr_t& Name,
  92. LONG Parent,
  93. LONG& Identity
  94. )
  95. {
  96. return m_ObjectsCommandNameParent.GetObjectNameParent(
  97. Name,
  98. Parent,
  99. Identity
  100. );
  101. }
  102. //////////////////////////////////////////////////////////////////////////
  103. // DeleteObject
  104. //////////////////////////////////////////////////////////////////////////
  105. HRESULT CObjects::DeleteObject(LONG Identity)
  106. {
  107. return m_ObjectsCommandDelete.DeleteObject(Identity);
  108. }
  109. //////////////////////////////////////////////////////////////////////////
  110. // InsertObject
  111. //////////////////////////////////////////////////////////////////////////
  112. BOOL CObjects::InsertObject(
  113. const _bstr_t& Name,
  114. LONG Parent,
  115. LONG& Identity
  116. )
  117. {
  118. return m_ObjectsCommandInsert.InsertObject(
  119. Name,
  120. Parent,
  121. Identity
  122. );
  123. }