This documentation is archived and is not being maintained.

SearchResultCollection.Handle Property

Gets the handle returned by IDirectorySearch::ExecuteSearch, which was called by DirectorySearcher that created this collection.

[Visual Basic]
Public ReadOnly Property Handle As IntPtr
public IntPtr Handle {get;}
public: __property IntPtr get_Handle();
public function get Handle() : IntPtr;

Property Value

The ADS_SEARCH_HANDLE value that this collection uses.


Each time you perform a query, DirectorySearcher creates a handle to the corresponding SearchResultCollection instance. This handle persists until you call Dispose or until garbage collection picks up the instance.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

SearchResultCollection Class | SearchResultCollection Members | System.DirectoryServices Namespace | DirectorySearcher | Dispose