访问注册表中的HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,这个项下的就是当前系统中安装的所有软件,至于读取哪些项,你可以自己到注册表下看一下就知道。 注册表进放方法:点开始点运行,输入regeditexe回车。 下面给出访问注册表的例程。希望对你有帮助。 Option Explicit Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _ (dest As Any, source As Any, ByVal numBytes As Long) Private Declare Function ExpandEnvironmentStrings Lib "kernel32" Alias "ExpandEnvironmentStringsA" _ (ByVal lpSrc As String, ByVal lpDst As String, ByVal nSize As Long) As Long ''''//注册表 API 函数声明 Private Declare Function RegOpenKeyEx Lib "advapi32dll" 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 "advapi32dll" (ByVal hKey As Long) As Long Private Declare Function RegQueryValueEx Lib "advapi32dll" Alias _ "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, _ ByVal lpReserved As Long, lpType As Long, lpData As Any, _ lpcbData As Long) As Long Private Declare Function RegSetValueEx Lib "advapi32" Alias "RegSetValueExA" _ (ByVal hKey As Long, ByVal lpValueName As String, _ ByVal Reserved As Long, ByVal dwType As Long, _ ByVal lpbData As Any, ByVal cbData As Long) As Long Private Declare Function RegCreateKeyEx Lib "advapi32" Alias "RegCreateKeyExA" _ (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, _ ByVal lpClass As String, ByVal dwOptions As Long, _ ByVal samDesired As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, _ phkResult As Long, lpdwDisposition As Long) As Long Private Declare Function RegEnumKeyEx Lib "advapi32dll" Alias "RegEnumKeyExA" _ (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, _ lpcbName As Long, ByVa
以上就是关于VB利用API怎么 *** 作注册表获取应用程序信息全部的内容,包括:VB利用API怎么 *** 作注册表获取应用程序信息、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)