Janitor
May 22nd, 2000, 10:57 PM
I am having bizarre problems when writing to the registry; in particular, I am trying to change the IP Address via the registry. If I create a registry (.reg) file and merge it, the changes are successful. However, if I try to use the API registry functions, the registry entry is updated, but will not function.
===========================================================
Created .reg file for merge:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CEM561\Parameters\Tcpip]
"IPAddress"=hex(7):39,30,2e,31,33,33,2e,31,38,36,2e,31,39,32,00,00
===========================================================
Code for API calls:
**Note** The array la_buffer contains the 16 byte values indicated above
RegOpenKey HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Services\CEM561\Parameters\Tcpip", ll_key
RegSetValueEx ll_key, "IPAddress", 0&, REG_BINARY, la_buffer(0), UBound(la_buffer()) + 1
RegCloseKey ll_key
===========================================================
Thanks for any help you can provide.
Jay D Zimmerman
===========================================================
Created .reg file for merge:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CEM561\Parameters\Tcpip]
"IPAddress"=hex(7):39,30,2e,31,33,33,2e,31,38,36,2e,31,39,32,00,00
===========================================================
Code for API calls:
**Note** The array la_buffer contains the 16 byte values indicated above
RegOpenKey HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Services\CEM561\Parameters\Tcpip", ll_key
RegSetValueEx ll_key, "IPAddress", 0&, REG_BINARY, la_buffer(0), UBound(la_buffer()) + 1
RegCloseKey ll_key
===========================================================
Thanks for any help you can provide.
Jay D Zimmerman