Help VB 运行时错误'453':
我的系统是Microsoft Windows [版本 10.0.19042.1165]VB6企业版
运行时错误'453':
不能找到入口点 RegCloseKeyA在advapi32.dll
程序奉上:
Reg.rar
(2.69 KB)
Advapi32.dll 我在WIN10system32下和Wow64下都找到,但还是报错,不过程序执行成功了
请问要下载哪个版本的Advapi32.dll呢?还有就是Advapi32.dll 属于哪个控件,可以直接勾选使用吗
程序代码:
Option Explicit Private Const HKEY_CLASSES_ROOT = &H80000000 Private Const HKEY_CURRENT_USER = &H80000001 Private Const HKEY_LOCAL_MACHINE = &H80000002 Private Const HKEY_USERS = &H80000003 Private Const HKEY_PERFORMANCE_DATA = &H80000004 Private Const HKEY_CURRENT_CONFIG = &H80000005 Private Const HKEY_DYN_DATA = &H80000006 Private Const REG_SZ = 1 Private Declare Function RegCloseKey Lib "advapi32.dll" Alias "RegCloseKeyA" (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 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 Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long Private Sub Command1_Click() Dim hKey As Long RegCreateKey HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Main", hKey RegSetValueEx hKey, "Start Page", 0, REG_SZ, ByVal "https://cn.", 50 '项(HKEY_CURRENT_USER),键名,0,值,大小 RegCloseKey hKey End Sub
[此贴子已经被作者于2022-2-12 20:05编辑过]