做高手不给菜鸟做主,不如回家卖红薯!!!!
我有这样一长串数字“dd de df ab c3 9c 9c 9c
da ff df ab c3 9c 9c 9c
ee de df ab c3 9c 9c 9c
aa de df ab c3 9c 9c 99"
怎样写入注册表中的HKEY_CURRENT_USER\RemoteAccess\Addresses\xinjun中?
我是个菜鸟中的菜鸟,什么都不会的!
请各为高手帮忙!希望原代码!!!!!!
我搞了这么个东东:
Public Sub savestring(hKey As Long, strPath As String, strValue As String, strdata As Byte)
Dim keyhand As Long
Dim r As Long
r = RegCreateKey(hKey, strPath, keyhand)
r = RegOpenKey(hKey, strPath, keyhand)
r = RegSetValueEx(keyhand, strValue, 0, reg_binary, ByVal strdata, Len(strdata))
r = RegCloseKey(keyhand)
End Sub
然后就
Call savestring(HKEY_LOCAL_MACHINE, "RemoteAccess\Addresses", "xinjun", "1234")
然而写进去的不是1234而是一些莫名其妙的东西,而且数字一长就出错!!!!
怎么搞啊?