Bueno el problema es k me he partido la cabeza y todavia no lo logroo.. mas especifico...plss
tambien miren este codigo...
Private Const REG_DWORD = 4
Private Const ERROR_SUCCESS = 0&
Private Const HKEY_CURRENT_USER = &H80000001
Private Const STANDARD_RIGHTS_ALL = &H1F0000
Private Const SYNCHRONIZE = &H100000
Private Const KEY_QUERY_VALUE = &H1
Private Const KEY_SET_VALUE = &H2
Private Const KEY_CREATE_LINK = &H20
Private Const KEY_ENUMERATE_SUB_KEYS = &H8
Private Const KEY_CREATE_SUB_KEY = &H4
Private Const KEY_NOTIFY = &H10
Private Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Declare Function RegLoadKey Lib "advapi32.dll" Alias "RegLoadKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpFile As String) As Long
Dim resultado As Long
Dim hKey As Long
Private Sub Command1_Click()
resultado = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\SimonTatham\PuTTY\Sessions\Default%20Settings", 0, KEY_ALL_ACCESS, hKey)
If resultado = ERROR_SUCCESS Then
RegSetValueEx hKey, "ProxyPort", 0, REG_DWORD, 3128, 4
End If
End Sub
Esto me agrega el Puerto 3128 en el Registro, ahora trate de hacer que en vez de agregarlo por codigo hacerlo por mediacion de un TextBox, o sea que el user lo introduzca...
Guarde el Valor en una Variable y la puse en donde va el 3128 de este caso y me agrega una burrada que para que, se que algo no estoy haciendo pero que....
necesito agregar ese Reg para que entonces mi soft pueda modificar este dato y otros mas...
grx