Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than netapi32, prefix the name with the module name and a period.
DsGetDcOpen (netapi32)
.
C# Signature:
using DWORD = System.UInt32;
using ULONG = System.UInt64;
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:
IntPtr pDcContext = new IntPtr();
int iReturn = 0;
// if you are getting the entire domain
iReturn = DsGetDcOpen("domain1.mydomains.com", 0, null, (System.IntPtr)null, null, 0, out pDcContext);
// if you are getting the entire domain
iReturn = DsGetDcOpen("domain1.mydomains.com", 0, null, (System.IntPtr)null, null, 0, out pDcContext);
// this is a great call, it will give you all the DC's that COVER a site, not just the DC's in that site:
iReturn = DsGetDcOpen("domain1.mydomains.com", 1, "MYADSITE", (System.IntPtr)null, null, 0, out pDcContext);
// this is a great call, it will give you all the DC's that COVER a site, not just the DC's in that site:
iReturn = DsGetDcOpen("domain1.mydomains.com", 1, "MYADSITE", (System.IntPtr)null, null, 0, out pDcContext);
Alternative Managed API:
Do you know one? Please contribute it!
The DsGetDcOpen function opens a new domain controller enumeration operation
10/11/2007 11:16:43 AM - dcray2000@hotmail.com-192.223.163.5
TODO - a short description
3/16/2007 7:31:57 AM - anfortas.geo@yahoo.com-216.204.61.86
Click to read this page
4/6/2008 7:23:14 AM - anonymous
Click to read this page
4/6/2008 7:23:14 AM - anonymous
The DsGetDcNext function retrieves the next domain controller in a domain controller enumeration operation.
7/13/2022 11:09:23 AM - 179.60.150.123
TODO - a short description
10/11/2007 11:17:26 AM - -171.161.160.10
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-72.43.165.29
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).