vb 编程修改注册表

SQ_Mars 2007-11-27 11:10:53
如何编程将下面的注册表项checkedvalue的值 改为0
将HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL的CheckedValue的值改为0,或者删除此项。

以及如何用vb编程将
“HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Policies\System”中的一个键名叫“DisableRegistryTools”的十六进制的值由0改为1。

恳请高手赐教,60分
...全文
406 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
嗷嗷叫的老马 2007-12-01
  • 打赏
  • 举报
回复
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL的CheckedValue的值由1改为0吧

看注释啊......模块里的注释应该很清楚了呀.

'字符串值
SetStringValue "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL", "CheckedValue", "0"

'DWORD 值
SetDWORDValue "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL", "CheckedValue", "0"
zzyong00 2007-11-30
  • 打赏
  • 举报
回复
8楼的引用“windows script host object model"----wshom.ocx
chyvlcy123 2007-11-30
  • 打赏
  • 举报
回复
不好意思我写错了
类型不是BINARY 应该是"REG_BINARY"
一个FORM 一个button 就OK了
SQ_Mars 2007-11-30
  • 打赏
  • 举报
回复
很想试试8楼的方法,可是提示无效的过程调用或参数,请问下要“引用”什么东西?
SQ_Mars 2007-11-29
  • 打赏
  • 举报
回复
8楼的方法好像要在“引用”个东西吧,否则提示无效的过程调用或参数
SQ_Mars 2007-11-29
  • 打赏
  • 举报
回复
我看得有点晕了
我没你们水平高啊
就简单说将HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL的CheckedValue的值由1改为0吧。
我简化下:
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey as long, ByVal lpszSubKey as string, lphKey long) as long
Private Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long



Private Sub Command1_Click()
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const HKEY_PERFORMANCE_DATA = &H80000004

Const REG_EXPAND_SZ = 2
Const REG_DWORD = 4
Const REG_SZ = 1
Dim sKeyName As String, sKeyValue As String, sKeyValueIcon As String
Dim Ret As Integer, lphKey As Long, gl As Integer, mn As Long


sKeyName = "SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL"
Ret = RegopenKeyEx&(HKEY_LOCAL_MACHINE, sKeyName, lphkey)
Ret = RegSetValue&(lphkey&, "checkedvalue", REG_DWORD, 1, 0&)
RegCloseKey Ret

不能将HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL的CheckedValue的值由1改为0。


后来我试用一下代码:
sKeyName = "Software\Microsoft\Windows\CurrentVersion\Run"
sKeyValue = App.Path & IIf(Len(App.Path) > 3, "\" & "abcde.txt", "abced.txt")
Ret = RegCreateKey&(HKEY_LOCAL_MACHINE, sKeyName, lphKey)
Ret = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)
RegCloseKey Ret
成功注入注册表

高手指点。



chyvlcy123 2007-11-29
  • 打赏
  • 举报
回复
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckedValue", 0, "REG_BINARY
上面的写错了
chyvlcy123 2007-11-29
  • 打赏
  • 举报
回复
给你来个简单的
Dim Wshshell As Object
Dim bkey As String
Set Wshshell = CreateObject("WScript.Shell")
Wshshell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsCurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckedValue", 0, "BINARY"
(值),(类型)
这是写入的 同样有值也可以修改

用Wshshell可以.出来别的
嗷嗷叫的老马 2007-11-28
  • 打赏
  • 举报
回复
再续上:

Function CreateKey(SubKey As String)

Call ParseKey(SubKey, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'create the key
If rtn = ERROR_SUCCESS Then 'if the key was created then
rtn = RegCloseKey(hKey) 'close the key
End If
End If

End Function
Function SetStringValue(SubKey As String, Entry As String, Value As String)

Call ParseKey(SubKey, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'open the key
If rtn = ERROR_SUCCESS Then 'if the key was open successfully then
rtn = RegSetValueEx(hKey, Entry, 0, REG_SZ, ByVal Value, LenB(StrConv(Value, vbFromUnicode))) 'write the value
If Not rtn = ERROR_SUCCESS Then 'if there was an error writting the value
If DisplayErrorMsg = True Then 'if the user wants errors displayed
MsgBox ErrorMsg(rtn) 'display the error
End If
End If
rtn = RegCloseKey(hKey) 'close the key
Else 'if there was an error opening the key
If DisplayErrorMsg = True Then 'if the user wants errors displayed
MsgBox ErrorMsg(rtn) 'display the error
End If
End If
End If

End Function
Function DelValue(SubKey As String, Entry As String)

Call ParseKey(SubKey, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'open the key
If rtn = ERROR_SUCCESS Then 'if the key could be opened then
rtn = RegDeleteValue(hKey, Entry)
End If
End If
End Function


使用方法自己看模块上面的注释,应该已经非常的清楚了.
嗷嗷叫的老马 2007-11-28
  • 打赏
  • 举报
回复
续上:

Function SetBinaryValue(SubKey As String, Entry As String, Value As String)

Call ParseKey(SubKey, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'open the key
If rtn = ERROR_SUCCESS Then 'if the key was open successfully then
lDataSize = LenB(StrConv(Value, vbFromUnicode))
ReDim ByteArray(lDataSize)
For I = 1 To lDataSize
ByteArray(I) = Asc(Mid$(Value, I, 1))
Next
rtn = RegSetValueExB(hKey, Entry, 0, REG_BINARY, ByteArray(1), lDataSize) 'write the value
If Not rtn = ERROR_SUCCESS Then 'if the was an error writting the value
If DisplayErrorMsg = True Then 'if the user want errors displayed
MsgBox ErrorMsg(rtn) 'display the error
End If
End If
rtn = RegCloseKey(hKey) 'close the key
Else 'if there was an error opening the key
If DisplayErrorMsg = True Then 'if the user wants errors displayed
MsgBox ErrorMsg(rtn) 'display the error
End If
End If
End If

End Function


Function GetBinaryValue(SubKey As String, Entry As String)

Call ParseKey(SubKey, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'open the key
If rtn = ERROR_SUCCESS Then 'if the key could be opened
lBufferSize = 1
rtn = RegQueryValueEx(hKey, Entry, 0, REG_BINARY, 0, lBufferSize) 'get the value from the registry
sBuffer = Space(lBufferSize)
rtn = RegQueryValueEx(hKey, Entry, 0, REG_BINARY, sBuffer, lBufferSize) 'get the value from the registry
If rtn = ERROR_SUCCESS Then 'if the value could be retreived then
rtn = RegCloseKey(hKey) 'close the key
GetBinaryValue = sBuffer 'return the value to the user
Else 'otherwise, if the value couldnt be retreived
GetBinaryValue = "Error" 'return Error to the user
If DisplayErrorMsg = True Then 'if the user wants to errors displayed
MsgBox ErrorMsg(rtn) 'display the error to the user
End If
End If
Else 'otherwise, if the key couldnt be opened
GetBinaryValue = "Error" 'return Error to the user
If DisplayErrorMsg = True Then 'if the user wants to errors displayed
MsgBox ErrorMsg(rtn) 'display the error to the user
End If
End If
End If

End Function
Function DeleteKey(Keyname As String)

Call ParseKey(Keyname, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, Keyname, hKey) 'open the key
If rtn = ERROR_SUCCESS Then 'if the key could be opened then
rtn = RegDeleteKey(hKey, Keyname) 'delete the key
rtn = RegCloseKey(hKey) 'close the key
End If
End If

End Function

Function GetMainKeyHandle(MainKeyName As String) As Long

Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const HKEY_PERFORMANCE_DATA = &H80000004
Const HKEY_CURRENT_CONFIG = &H80000005
Const HKEY_DYN_DATA = &H80000006

Select Case MainKeyName
Case "HKEY_CLASSES_ROOT"
GetMainKeyHandle = HKEY_CLASSES_ROOT
Case "HKEY_CURRENT_USER"
GetMainKeyHandle = HKEY_CURRENT_USER
Case "HKEY_LOCAL_MACHINE"
GetMainKeyHandle = HKEY_LOCAL_MACHINE
Case "HKEY_USERS"
GetMainKeyHandle = HKEY_USERS
Case "HKEY_PERFORMANCE_DATA"
GetMainKeyHandle = HKEY_PERFORMANCE_DATA
Case "HKEY_CURRENT_CONFIG"
GetMainKeyHandle = HKEY_CURRENT_CONFIG
Case "HKEY_DYN_DATA"
GetMainKeyHandle = HKEY_DYN_DATA
End Select

End Function

Function ErrorMsg(lErrorCode As Long) As String

'If an error does accurr, and the user wants error messages displayed, then
'display one of the following error messages

Select Case lErrorCode
Case 1009, 1015
GetErrorMsg = "The Registry Database is corrupt!"
Case 2, 1010
GetErrorMsg = "Bad Key Name"
Case 1011
GetErrorMsg = "Can't Open Key"
Case 4, 1012
GetErrorMsg = "Can't Read Key"
Case 5
GetErrorMsg = "Access to this key is denied"
Case 1013
GetErrorMsg = "Can't Write Key"
Case 8, 14
GetErrorMsg = "Out of memory"
Case 87
GetErrorMsg = "Invalid Parameter"
Case 234
GetErrorMsg = "There is more data than the buffer has been allocated to hold."
Case Else
GetErrorMsg = "Undefined Error Code: " & Str$(lErrorCode)
End Select

End Function

Function ClearKK(Str As String)

Dim I As Long

Dim K As String

For I = 1 To Len(Str)

K = Mid(Str, I, 1)

If K = Chr(0) Then

Str = Mid(Str, 1, I)

Exit For

End If

Next

End Function

Function GetStringValue(SubKey As String, Entry As String)

Call ParseKey(SubKey, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'open the key
If rtn = ERROR_SUCCESS Then 'if the key could be opened then
sBuffer = Space(255) 'make a buffer
lBufferSize = LenB(StrConv(sBuffer, vbFromUnicode))
rtn = RegQueryValueEx(hKey, Entry, 0, REG_SZ, sBuffer, lBufferSize) 'get the value from the registry
If rtn = ERROR_SUCCESS Then 'if the value could be retreived then
rtn = RegCloseKey(hKey) 'close the key
sBuffer = Trim(sBuffer)
ClearKK sBuffer
GetStringValue = Trim(Left(sBuffer, LenB(StrConv(sBuffer, vbFromUnicode)) - 1)) 'return the value to the user
Else 'otherwise, if the value couldnt be retreived
GetStringValue = "Error" 'return Error to the user
If DisplayErrorMsg = True Then 'if the user wants errors displayed then
MsgBox ErrorMsg(rtn) 'tell the user what was wrong
End If
End If
Else 'otherwise, if the key couldnt be opened
GetStringValue = "Error" 'return Error to the user
If DisplayErrorMsg = True Then 'if the user wants errors displayed then
MsgBox ErrorMsg(rtn) 'tell the user what was wrong
End If
End If
End If

End Function

Private Sub ParseKey(Keyname As String, Keyhandle As Long)

rtn = InStr(Keyname, "\") 'return if "\" is contained in the Keyname

If Left(Keyname, 5) <> "HKEY_" Or Right(Keyname, 1) = "\" Then 'if the is a "\" at the end of the Keyname then
MsgBox "Incorrect Format:" + Chr(10) + Chr(10) + Keyname 'display error to the user
Exit Sub 'exit the procedure
ElseIf rtn = 0 Then 'if the Keyname contains no "\"
Keyhandle = GetMainKeyHandle(Keyname)
Keyname = "" 'leave Keyname blank
Else 'otherwise, Keyname contains "\"
Keyhandle = GetMainKeyHandle(Left(Keyname, rtn - 1)) 'seperate the Keyname
Keyname = Right(Keyname, LenB(StrConv(Keyname, vbFromUnicode)) - rtn)
End If

End Sub
嗷嗷叫的老马 2007-11-28
  • 打赏
  • 举报
回复
无语

既然要代码,就给你代码吧.

也不管你能不能学到东西了.

把下面代码保存为ModRW_Reg.bas:

'*************************************************************************
'**模 块 名:ModRW_Reg
'**创 建 人:马大哈
'**日 期:2003年11月17日
'**描 述:本模块是有关注册表操作的
'**版 本:V1.0
'*************************************************************************
'
'使用示例:

'新建串值
'SetStringValue "HKEY_LOCAL_MACHINE", "String Value", "Hello Visual Basic programmer"

'SetStringValue "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Internat", "internat.exe"

'新建二进制值
'SetBinaryValue "HKEY_LOCAL_MACHINE", "Binary Value", Chr$(&H1) + Chr$(&H2) + Chr$(&H3) + Chr$(&H4)

'新建 DWORD 值
'SetDWORDValue "HKEY_LOCAL_MACHINE", "DWORD Value", "1"

'读取串值
'GetStringValue("HKEY_LOCAL_MACHINE", "String Value")

'读取二进制值
'GetBinaryValue("HKEY_LOCAL_MACHINE", "Binary Value")
'If rtn = Chr$(&H1) + Chr$(&H2) + Chr$(&H3) + Chr$(&H4) Then

'读取 DWORD 值
'GetDWORDValue("HKEY_LOCAL_MACHINE", "DWORD Value")

'删除键值
'DelValue("HKEY_LOCAL_MACHINE", "String Value")

'新建主键
'CreateKey "HKEY_LOCAL_MACHINE\Registry Editor"

'删除主键
'DeleteKey "HKEY_LOCAL_MACHINE\Registry Editor"

Type FILETIME
lLowDateTime As Long
lHighDateTime As Long
End Type

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 RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" _
(ByVal hKey As Long, _
ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" _
(ByVal hKey As Long, _
ByVal lpSubKey As String) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" _
(ByVal hKey As Long, _
ByVal lpValueName As String, _
ByVal lpReserved As Long, lpType As Long, _
ByVal lpData As String, lpcbData As Long) As Long
Private Declare Function RegQueryValueExA Lib "advapi32.dll" _
(ByVal hKey As Long, _
ByVal lpValueName As String, _
ByVal lpReserved As Long, lpType As Long, _
ByRef lpData As Long, lpcbData 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, _
ByVal lpData As String, _
ByVal cbData As Long) As Long
Private Declare Function RegSetValueExA Lib "advapi32.dll" _
(ByVal hKey As Long, _
ByVal lpValueName As String, _
ByVal Reserved As Long, _
ByVal dwType As Long, _
ByRef lpData As Long, _
ByVal cbData As Long) As Long
Private Declare Function RegSetValueExB Lib "advapi32.dll" Alias "RegSetValueExA" _
(ByVal hKey As Long, _
ByVal lpValueName As String, _
ByVal Reserved As Long, _
ByVal dwType As Long, _
ByRef lpData As Byte, _
ByVal cbData As Long) As Long
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" _
(ByVal hKey As Long, _
ByVal lpValueName As String) As Long

Const ERROR_SUCCESS = 0&
Const ERROR_BADDB = 1009&
Const ERROR_BADKEY = 1010&
Const ERROR_CANTOPEN = 1011&
Const ERROR_CANTREAD = 1012&
Const ERROR_CANTWRITE = 1013&
Const ERROR_OUTOFMEMORY = 14&
Const ERROR_INVALID_PARAMETER = 87&
Const ERROR_ACCESS_DENIED = 5&
Const ERROR_NO_MORE_ITEMS = 259&
Const ERROR_MORE_DATA = 234&

Const REG_NONE = 0&
Const REG_SZ = 1&
Const REG_EXPAND_SZ = 2&
Const REG_BINARY = 3&
Const REG_DWORD = 4&
Const REG_DWORD_LITTLE_ENDIAN = 4&
Const REG_DWORD_BIG_ENDIAN = 5&
Const REG_LINK = 6&
Const REG_MULTI_SZ = 7&
Const REG_RESOURCE_LIST = 8&
Const REG_FULL_RESOURCE_DESCRIPTOR = 9&
Const REG_RESOURCE_REQUIREMENTS_LIST = 10&

Const KEY_QUERY_VALUE = &H1&
Const KEY_SET_VALUE = &H2&
Const KEY_CREATE_SUB_KEY = &H4&
Const KEY_ENUMERATE_SUB_KEYS = &H8&
Const KEY_NOTIFY = &H10&
Const KEY_CREATE_LINK = &H20&
Const READ_CONTROL = &H20000
Const WRITE_DAC = &H40000
Const WRITE_OWNER = &H80000
Const SYNCHRONIZE = &H100000
Const STANDARD_RIGHTS_REQUIRED = &HF0000
Const STANDARD_RIGHTS_READ = READ_CONTROL
Const STANDARD_RIGHTS_WRITE = READ_CONTROL
Const STANDARD_RIGHTS_EXECUTE = READ_CONTROL
Const KEY_READ = STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY
Const KEY_WRITE = STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY
Const KEY_EXECUTE = KEY_READ

Dim hKey As Long, MainKeyHandle As Long
Dim rtn As Long, lBuffer As Long, sBuffer As String
Dim lBufferSize As Long
Dim lDataSize As Long
Dim ByteArray() As Byte

'This constant determins wether or not to display error messages to the
'user. I have set the default value to False as an error message can and
'does become irritating after a while. Turn this value to true if you want
'to debug your programming code when reading and writing to your system
'registry, as any errors will be displayed in a message box.

Const DisplayErrorMsg = False
Function SetDWORDValue(SubKey As String, Entry As String, Value As Long)

Call ParseKey(SubKey, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'open the key
If rtn = ERROR_SUCCESS Then 'if the key was open successfully then
rtn = RegSetValueExA(hKey, Entry, 0, REG_DWORD, Value, 4) 'write the value
If Not rtn = ERROR_SUCCESS Then 'if there was an error writting the value
If DisplayErrorMsg = True Then 'if the user want errors displayed
MsgBox ErrorMsg(rtn) 'display the error
End If
End If
rtn = RegCloseKey(hKey) 'close the key
Else 'if there was an error opening the key
If DisplayErrorMsg = True Then 'if the user want errors displayed
MsgBox ErrorMsg(rtn) 'display the error
End If
End If
End If

End Function
Function GetDWORDValue(SubKey As String, Entry As String)

Call ParseKey(SubKey, MainKeyHandle)

If MainKeyHandle Then
rtn = RegCreateKey(MainKeyHandle, SubKey, hKey) 'open the key
If rtn = ERROR_SUCCESS Then 'if the key could be opened then
rtn = RegQueryValueExA(hKey, Entry, 0, REG_DWORD, lBuffer, 4) 'get the value from the registry
If rtn = ERROR_SUCCESS Then 'if the value could be retreived then
rtn = RegCloseKey(hKey) 'close the key
GetDWORDValue = lBuffer 'return the value
Else 'otherwise, if the value couldnt be retreived
GetDWORDValue = "Error" 'return Error to the user
If DisplayErrorMsg = True Then 'if the user wants errors displayed
MsgBox ErrorMsg(rtn) 'tell the user what was wrong
End If
End If
Else 'otherwise, if the key couldnt be opened
GetDWORDValue = "Error" 'return Error to the user
If DisplayErrorMsg = True Then 'if the user wants errors displayed
MsgBox ErrorMsg(rtn) 'tell the user what was wrong
End If
End If
End If

End Function
SQ_Mars 2007-11-28
  • 打赏
  • 举报
回复
给个具体点的代码吧,先感谢了,我还没学过vb 注册表的代码的用法
SQ_Mars 2007-11-28
  • 打赏
  • 举报
回复
给个代码吧,60分呢,呵呵
tianhuo_soft 2007-11-28
  • 打赏
  • 举报
回复
使用以下三个api函数:
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
(创建注册表项)
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey 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
(设置注册表项)
cangwu_lee 2007-11-27
  • 打赏
  • 举报
回复

參考這篇:
http://topic.csdn.net/t/20030227/14/1472918.html

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧