📄 regconnect.bas
字号:
Attribute VB_Name = "Module1"
Option Explicit
Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003
Public Const HKEY_CURRENT_CONFIG = &H80000005
Public Const HKEY_DYN_DATA = &H80000006
' You will need to change the location of the DLL
Declare Function RegDBGetKeyValueEx Lib "D:\Soft\IBM\RegConnect\java\RegConnect.dll" (ByVal Machine As String, ByVal hKey As Long, _
ByVal KeyName As String, ByVal szValue As String, ByVal sReturn As String) As Integer
Declare Function RegDBSetKeyValueEx Lib "D:\Soft\IBM\RegConnect\java\RegConnect.dll" (ByVal Machine As String, ByVal hKey As Long, _
ByVal KeyName As String, ByVal szValue As String, ByVal sReturn As String) As Integer
Function GetRegValue(sMachine$, hKey&, sRegTree$, sKey$) As String
Dim Temp&, sReturn$
sReturn$ = Space(128) 'Allocate space for the returned string
Temp& = RegDBGetKeyValueEx(sMachine$, hKey&, sRegTree$, sKey$, sReturn$)
GetRegValue = Left$(sReturn$, InStr(sReturn$, Chr$(0))) 'Get the value of the string up to the first NULL
End Function
Function SetRegValue(sMachine$, hKey&, sRegTree$, sKey$, sValue$) As Integer
SetRegValue = RegDBSetKeyValueEx(sMachine$, hKey&, sRegTree$, sKey$, sValue$)
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -