我们参考您的改法,改成了如下:
function GetOCXPath(var Path: string): Boolean;
const
HHPathRegKey = 'CLSID\{adb880a6-d8ff-11cf-9377-00aa003b7a11}\InprocServer32';
var
TmpStr: array[0..255] of Char;
begin
with TRegistry.Create do
try
RootKey := HKEY_CLASSES_ROOT;
if OpenKeyReadOnly(HHPathRegKey) then Path := ReadString('');
FillChar(TmpStr, SizeOf(TmpStr), 0);
ExpandEnvironmentStrings(PChar(Path), TmpStr, SizeOf(TmpStr));
Path := TmpStr;
Result := (Path <> '') and FileExists(Path);
finally
Free;
end;
end;
我们网站上的最新构建版CnWizards 0.8.2.303 Unstable已经集成了此修改,
您能否下载此构建版本在VISTA上再测试一下?
http://www.cnpack.org/downbuilds.php