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.
NetJoinDomain (netapi32)
.
C# Signature:
[DllImport("netapi32.dll"", CharSet=CharSet.Unicode)]
static extern int NetJoinDomain(
string lpServer,
string lpDomain,
string lpAccountOU,
string lpAccount,
string lpPassword,
int fJoinOptions);
VB Signature:
Declare Function NetJoinDomain Lib "netapi32.dll" (TODO) As TODO
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes or one of the system error codes.
Return code Description:
Tips & Tricks:
To join a machine to a domain the same way that netdom.exe does, use the flags NETSETUP_JOIN_DOMAIN and NETSETUP_ACCT_CREATE. (I determined this by using a debugger to watch which flags netdom used.)
Sample Code:
Please add some!
Alternative Managed API:
Do you know one? Please contribute it!
The NetJoinDomain function joins a computer to a workgroup or domain.
10/1/2015 7:39:17 AM - -203.20.245.12
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).