【求助】RegQueryValueEx 读取注册表内存报错!
代码如下:程序代码:
Dim regOpen As Long Dim regRead As Long Dim regValue As String Dim regValuesize As Long regValue = Space(300) regValuesize = Len(regValue) - 1 Dim regHandle As Long regOpen = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\zcloseie", 0, KEY_ALL_ACCESS, regHandle) If regOpen = ERROR_SUCCESS Then regRead = RegQueryValueEx(regHandle, "word1", 0, REG_SZ, regValue, regValuesize) If regRead = ERROR_SUCCESS Then MsgBox regValue End If RegCloseKey (regHandle)
我已经在注册表里建立了相应的值:
如下:
希望各位大侠给条明路、、在这里先谢谢大家了!