"greg chu" <gr******@wendy s.com> schrieb:
Private Declare Function SetComputerName Lib "kernel32" Alias
"SetComputerNam eA" (ByVal lpComputerName As String) As Long
SetComputerName (newname)
newname is the name I want to change to.
But after I reboot the windows 2000 prof. the computer name remained
the same.
Use this declare instead:
\\\
Private Declare Auto Function SetComputerName Lib "kernel32.d ll" ( _
ByVal lpComputerName As String _
) As Boolean
..
..
..
Dim Success As Boolean = SetComputerName ("Bla")
///
First, check the return value. If it is 'False', then check the computer
name (see documentation for information about valid computer names).
Second, note that the name change will take place after a restart.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>