[DllImport("kernel32.dll")]
static extern bool SetComputerName(string lpComputerName);
None.
You need to restart your computer for the new computer name to take effect.
Please add some!
using System.Runtime.InteropServices;
class Program
{
[DllImport("kernel32.dll")]
static extern bool SetComputerName(string lpComputerName);
static void Main(string[] args)
{
bool done = SetComputerName("New Comp Name");
if (done)
{
Console.WriteLine("Done");
}
Console.ReadKey();
}
}
Do you know one? Please contribute it!
http://msdn2.microsoft.com/en-us/library/ms724930.aspx