请高手看看下面的程序
Private Sub Command1_Click()
Dim Newhandle As Long
Dim RetLength As Long
Dim RegRet As Long
Dim RegValue As String
Dim Regpath as string
Dim Regname as string
RegPath = "Software\A4Tech\WheelMouse\CurrentVersion"
RegName = "InstallPath"
Call RegOpenKeyEx(HKEY_LOCAL_MACHINE, RegPath, 0, KEY_ALL_ACCESS, Newhandle)
RegRet = RegQueryValueEx(Newhandle, RegName, 0, REG_SZ, RegValue, RetLength)
RegCloseKey (Newhandle&)
End Sub
现在有个问题,RegRet的值为零,RetLength的值也正确,但是Regvalue却为空,是什么原因?
Private Sub Command1_Click()
Dim Newhandle As Long
Dim RetLength As Long
Dim RegRet As Long
Dim RegValue As String
Dim Regpath as string
Dim Regname as string
RegPath = "Software\A4Tech\WheelMouse\CurrentVersion"
RegName = "InstallPath"
Call RegOpenKeyEx(HKEY_LOCAL_MACHINE, RegPath, 0, KEY_ALL_ACCESS, Newhandle)
RegRet = RegQueryValueEx(Newhandle, RegName, 0, REG_SZ, RegValue, RetLength)
RegCloseKey (Newhandle&)
End Sub
现在有个问题,RegRet的值为零,RetLength的值也正确,但是Regvalue却为空,是什么原因?
解决方案 »
- 请问一个ADO记录问题?
- 如何能捕捉到程序最小化时的动作
- 请问 怎么修改单位??
- 求VB 做的简单的排版系统源码!谢谢!
- 有些网站很奇怪,你把它放webbrowser里以后,它点击它里面的链接它就永远在webbrowser里打开了.怎么让它可以弹出Ie打开呢?
- 有谁知道用vb如何把bmp的文件转换为jpg格式??
- combobox问题。我想选择其中的内容并触某个事件.我用的是CLICK事件,可是用CLICK事件时,取COMBOBOX中的内容却是空的.
- 怎样用vb编写自动加入日志文件到数据库
- 想要vb中对一维数组排序的代码,急!
- 我的问题也是怎样把文本文件中的回车换行去掉,存盘后在TEXT中显示,要源码。急死人了!
- 终极讨论:从Excel文件里面导入数据
- 用VB操作Excel文件
Dim Newhandle As Long
Dim RetLength As Long
Dim RegRet As Long
Dim RegValue As String
Dim Regpath as string
Dim Regname as string
RegPath = "Software\A4Tech\WheelMouse\CurrentVersion"
RegName = "InstallPath"
Call RegOpenKeyEx(HKEY_LOCAL_MACHINE, RegPath, 0, KEY_ALL_ACCESS, Newhandle)
RegRet = RegQueryValueEx(Newhandle, RegName, 0, REG_SZ,Byval RegValue, RetLength)
RegCloseKey (Newhandle&)
End Sub
我也碰到与你同样的问题,不知你最后怎么解决的,急盼回复,多谢了