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.
Declare Function NetJoinDomain Lib "Netapi32.dll" _
(ByVal lpServer As String, _
ByVal lpDomain As String, _
ByVal lpAccountOU As String, _
ByVal lpAccount As String, _
ByVal lpPassword As String, _
ByVal fJoinOptions As Integer) As Integer
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.)
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).