次の方法で共有


Domain Participation Tools

You can use a domain participation tool to add your target system to a network domain. Microsoft Windows XP Professional and Microsoft Windows 2000 Service Pack 2 both provide Netdom.exe, a tool that joins a computer to a domain through a command-line interface. Netdom.exe is located on the Windows XP Professional or Windows 2000 Service Pack 2 product CD in the Support Tools directory.

You can also use the NetJoinDomain function to create a customized application for adding your target system to a domain. This function is part of the standard Win32 API.

The following example shows how to use the NetJoinDomain function.

dwError = NetJoinDomain( *szComputerName ? szComputerName : NULL,
                         szDomain,
                         NULL,
                         szUser,
                         szPassword,
                         dwFlags );
if( dwError != NERR_Success )
{
  //handle error
}
else
{
  //success
}

See Also

Domain Participation | Automatically Joining a Domain with a Custom Application | Add Security Features to a Run-Time Image

Last updated on Wednesday, October 18, 2006

© 2006 Microsoft Corporation. All rights reserved.