[qqface3]发现 Dx 系例组件大家可能用的很普遍了其中最新版本中有个cxProgressBar控件目前发现 这个控件与 这句使用COM中常用的代码有“冲突”
ActiveX.CoInitialize(nil);
使COM对像不能正确初始化大家有环境可以测试一下function Init(): HRESULT;
begin
Result := S_OK;
if not assigned(SchedulingAgent) then
begin
Result := ActiveX.CoInitialize(nil);
if Result <> S_OK then
begin
ActiveX.CoUninitialize;
ShowMessage('Error');
Application.Terminate;
end
else begin
ShowMessage('ok');
end;
end;
end;
ActiveX.CoInitialize(nil);
使COM对像不能正确初始化大家有环境可以测试一下function Init(): HRESULT;
begin
Result := S_OK;
if not assigned(SchedulingAgent) then
begin
Result := ActiveX.CoInitialize(nil);
if Result <> S_OK then
begin
ActiveX.CoUninitialize;
ShowMessage('Error');
Application.Terminate;
end
else begin
ShowMessage('ok');
end;
end;
end;
人心散了,队伍不好带
-------------------------------------
...此帖用 CSDN's forum Explorer 回地
还有要升职了 哇哈哈哈高兴呀!!
CSDN论坛浏览器:http://CoolSlob.ys168.com/
if Result <> S_OK then //这样判断就当它错是不妥当的.
begin
.........
ShowMessage('Error');
end
-------------------------------------
...此帖用 CSDN's forum Explorer 回地
还有要升职了 哇哈哈哈高兴呀!!
CSDN论坛浏览器:http://CoolSlob.ys168.com/
function Succeeded(Res: HResult): Boolean;
begin
Result := Res and $80000000 = 0;
end;
-------------------------------------
...此帖用 CSDN's forum Explorer 回地
还有要升职了 哇哈哈哈高兴呀!!
CSDN论坛浏览器:http://CoolSlob.ys168.com/