DsGetDcOpen (netapi32)
Last changed: dcray2000@hotmail.com-192.223.163.5

.
Summary
The DsGetDcOpen function opens a new domain controller enumeration operation

C# Signature:

using DWORD = System.UInt32;
using ULONG = System.UInt64;

[DllImport(Netapi32, CharSet=CharSet.Auto, SetLastError=true)]
internal static extern DWORD DsGetDcOpen(
     [MarshalAs(UnmanagedType.LPTStr)]
     string DnsName,
     ULONG OptionFlags,
     [MarshalAs(UnmanagedType.LPTStr)]
     string SiteName,
     IntPtr DomainGuid,
     [MarshalAs(UnmanagedType.LPTStr)]
     string DnsForestName,
     ULONG DcFlags,
     out IntPtr RetGetDcContext
     );

VB Signature:

Declare Function DsGetDcOpen Lib "netapi32.dll" (TODO) As TODO

User-Defined Types:

None.

Notes:

RetGetDcContext

out Pointer to a HANDLE value that receives the domain controller enumeration context handle. This handle is used with the DsGetDcNext function to identify the domain controller enumeration operation. This handle is passed to DsGetDcClose to close the domain controller enumeration operation.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
DsGetDcOpen on MSDN