G
Guest
I am trying to figure out how to save aTCPIP address entry in the
comm\tcpip\hosts registy. I can make the host key with the name and save the
ipaddress key with a string value, but need to convert to binary value. I was
looking at the bitconverter, but didnt see what the conversion would be? Any
help would be great!
Dim nipaddress As string
Dim bipaddress As string
nipaddress = Hex(TextBox3.Text) + " " + Hex(TextBox4.Text) + " " +
Hex(TextBox5.Text) + " " + Hex(TextBox6.Text)
bipaddress=System.BitConverter.ToDouble(nipaddress)
Dim regVersion As OpenNETCF.Win32.RegistryKey
Dim keyName As String = "Comm\\Tcpip\\Hosts\\" + TextBox1.Text
regVersion = OpenNETCF.Win32.Registry.LocalMachine.CreateSubKey(keyName)
regVersion.SetValue("ipaddr", bipaddress)
regVersion.Close()
comm\tcpip\hosts registy. I can make the host key with the name and save the
ipaddress key with a string value, but need to convert to binary value. I was
looking at the bitconverter, but didnt see what the conversion would be? Any
help would be great!
Dim nipaddress As string
Dim bipaddress As string
nipaddress = Hex(TextBox3.Text) + " " + Hex(TextBox4.Text) + " " +
Hex(TextBox5.Text) + " " + Hex(TextBox6.Text)
bipaddress=System.BitConverter.ToDouble(nipaddress)
Dim regVersion As OpenNETCF.Win32.RegistryKey
Dim keyName As String = "Comm\\Tcpip\\Hosts\\" + TextBox1.Text
regVersion = OpenNETCF.Win32.Registry.LocalMachine.CreateSubKey(keyName)
regVersion.SetValue("ipaddr", bipaddress)
regVersion.Close()