导出的注册表Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WindowsCombs]
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):43,00,3a,00,5c,00,57,00,49,00,4e,00,44,00,4f,00,57,00,53,00,\
5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,69,00,6e,\
00,64,00,6f,00,77,00,73,00,43,00,6f,00,6d,00,62,00,73,00,2e,00,65,00,78,00,\
65,00,00,00
"DisplayName"="WindowsCombs"
"ObjectName"="LocalSystem"[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WindowsCombs\Enum]
"0"="Root\\LEGACY_WINDOWSCOMBS\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WindowsCombs\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00------------------------------------------------------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 RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, 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这几个搞不懂,最好可以解释一下!谢谢
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):43,00,3a,00,5c,00,57,00,49,00,4e,00,44,00,4f,00,57,00,53,00,\
5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,69,00,6e,\
00,64,00,6f,00,77,00,73,00,43,00,6f,00,6d,00,62,00,73,00,2e,00,65,00,78,00,\
65,00,00,00
"DisplayName"="WindowsCombs"
"ObjectName"="LocalSystem"[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WindowsCombs\Enum]
"0"="Root\\LEGACY_WINDOWSCOMBS\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WindowsCombs\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00------------------------------------------------------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 RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, 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这几个搞不懂,最好可以解释一下!谢谢
解决方案 »
- Recordset 当值返回
- VB 问题
- 跪求TreeView程序,在线等(新手急啊)马上送分
- 急迫问题
- 有关MSHFlexGrid导入Excel的问题,高手有请!
- 用HTML Help Workshop开发的帮助文件文字能看到,图片看不到?为什么?救命啊!!
- 利用Mapi发送邮件的一个菜鸟问题,求救!!!
- 如何在listview控件中的dblclick事件中取得当前的数据库中的数据。
- 如何消除WAVE余音?
- 控件过期,哪位高手能解决?送28分。
- 凡是涉及字符串处理的API函数都有A和W两个版本,那么请问DrawTextA和DrawTextW有什么区别呢?
- vb6 的mshflexgrid控件的单元格能容纳多少个字符呀?
ret3 = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Services\WindowsCombs\Security", hSubKey3)
'输入子健值
Dim SByte As String
'你要写入的字符串
SByte = "01 00 14 80 90 00 00 00 9c 00 00 00 14 00 00 00 30 00 00 00 02 " + _
"00 1c 00 01 00 00 00 02 80 14 00 ff 01 0f 00 01 01 00 00 00 00 00 01 00 00 " + _
"00 00 02 00 60 00 04 00 00 00 00 00 14 00 fd 01 02 00 01 01 00 00 00 00 00 " + _
"05 12 00 00 00 00 00 18 00 ff 01 0f 00 01 02 00 00 00 00 00 05 20 00 00 00 " + _
"20 02 00 00 00 00 14 00 8d 01 02 00 01 01 00 00 00 00 00 05 0b 00 00 00 00 " + _
"00 18 00 fd 01 02 00 01 02 00 00 00 00 00 05 20 00 00 00 23 02 00 00 01 01 " + _
"00 00 00 00 00 05 12 00 00 00 01 01 00 00 00 00 00 05 12 00 00 00"
Dim i As Long
Dim Length As Long
Dim strByte() As Byte
Length = Int((Len(SByte) - 1) / 3)
ReDim strByte(Length)
For i = 0 To Length
strByte(i) = CByte(Val("&H " + Mid(SByte, i * 3 + 1, 2)))
Next i
'写入字符串
SaveString HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Services\WindowsCombs\Security", "Security", strByte
RegCloseKey hSubKey3Public Sub SaveString(hKey As Long, strPath As String, strValue As String, strData() As Byte)
Const REG_BINARY = 3
Dim KeyHand As Long
Dim r As Long
r = RegCreateKeyEx(hKey, strPath, KeyHand)
r = RegOpenKey(hKey, strPath, KeyHand)
r = RegSetValueEx(KeyHand, strValue, 0, REG_BINARY, strData(0), UBound(strData) - LBound(strData) + 1)
r = RegCloseKey(KeyHand)
End Sub谷歌了 2天,问题解决了,但服务提示配置类型不正确郁闷中