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 NetRenameMachineInDomain Lib "netapi32.dll" (TODO) As TODO
C# User-Defined Types:
internal const uint NETSETUP_ACCT_CREATE = 2;
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
lpServer - (in) Pointer to a constant string that specifies the DNS or NetBIOS name of the computer on which to call the function. If this parameter is NULL, the local computer is used. Windows NT: This string must begin with \\.
lpNewMachineName - (in) Pointer to a constant string that specifies the new name of the computer. If specified, the local computer name is changed as well. If this parameter is NULL, the function assumes you have already called the SetComputerNameEx function.
lpAccount - (in) Pointer to a constant string that specifies an account name to use when connecting to the domain controller. If this parameter is NULL, the caller's context is used.
lpPassword - (in) If the lpAccount parameter specifies an account name, this parameter must point to the password to use when connecting to the domain controller. Otherwise, this parameter must be NULL.
fRenameOptions - (in) Specifies the rename options. If this parameter is NETSETUP_ACCT_CREATE, the function renames the account in the domain.
private void RenameMachine()
{
//This function will change the current PC's name to "PCNEWNAME" using the given domain account. This changes it both locally and on the domain.
The Netbios function interprets and executes the specified network control block (NCB). The Netbios function is provided primarily for applications that were written for the NetBIOS interface and need to be ported to Windows. Applications not requiring compatibility with NetBIOS should use other interfaces, such as mailslots, named pipes, RPC, or distributed COM to accomplish tasks similar to those supported by NetBIOS. These other interfaces are more flexible and portable.
5/23/2014 9:41:50 AM - jonr@reedholm.com-71.114.254.154
Sets a NetBIOS or DNS name for the local computer.
3/16/2007 7:57:53 AM - -129.186.82.93
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).