NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DirectoryEntry.CopyTo (DirectoryEntry, String)

Creates a copy of this entry as a child of the given parent and gives it a new name.

[Visual Basic]
Overloads Public Function CopyTo( _
   ByVal newParent As DirectoryEntry, _
   ByVal newName As String _
) As DirectoryEntry
[C#]
public DirectoryEntry CopyTo(
   DirectoryEntry newParent,
   string newName
);
[C++]
public: DirectoryEntry* CopyTo(
   DirectoryEntry* newParent,
   String* newName
);
[JScript]
public function CopyTo(
   newParent : DirectoryEntry,
   newName : String
) : DirectoryEntry;

Parameters

newParent
The parent DirectoryEntry.
newName
The name of the copy of the this entry.

Return Value

A renamed copy of this entry as a child of the given parent.

Exceptions

Exception Type Condition
COMException The given DirectoryEntry does not exist. The associated error code is E_ADS_UNKNOWN_OBJECT.

See Also

DirectoryEntry Class | DirectoryEntry Members | System.DirectoryServices Namespace | DirectoryEntry.CopyTo Overload List