我查了一下,regopenkeyex函数的描述在delphi自带的windows.pas中,“function RegOpenKeyEx; external advapi32 name 'RegOpenKeyExW';”而advapi32的声明在同一个文件中,
const
{$IFDEF MSWINDOWS}
advapi32
= 'advapi32.dll';
kernel32
= 'kernel32.dll';我的做法是将64位win7下的windows.pas和advapi32.dll拷到xp下,windows.pas替换xp下的windows.pas,内容做如下修改:“function RegOpenKeyEx; external advapi321 name 'RegOpenKeyExW';
同时,在 advapi32
= 'advapi32.dll'前增加一行:advapi321
= 'advapi321.dll',将考过来的advapi32.dll改名advapi321.dll,并同时存放在c:\windows\system32以及windows.pas同目录下。可是仍然无法解决。