CnPack Forum


 
Subject: 实现IOTACodeInsightServices接口的类向IDE注册后应该如果释放?一退出就会出错……
Diroc
新警察
Rank: 1



UID 47485
Digest Posts 0
Credits 16
Posts 6
点点分 16
Reading Access 10
Registered 2010-4-28
Status Offline
Post at 2010-4-28 23:32  Profile | Blog | P.M. 
实现IOTACodeInsightServices接口的类向IDE注册后应该如果释放?一退出就会出错……

注册的代码如下所示,
var
  cis: IOTACodeInsightServices;
begin
  if Supports(BorlandIDEServices, IOTACodeInsightServices, cis)
    and (FViewerIndex = cInvalidIndex) then
  begin
    FViewerIndex := cis.AddCodeInsightManager(TQNoteCodeViewer.Create);
  end;
end;

在退出的时候,会执行下面代码
var
  cis: IOTACodeInsightServices;
begin
  if Supports(BorlandIDEServices, IOTACodeInsightServices, cis)
    and (FViewerIndex <> cInvalidIndex) then
  begin
    cis.RemoveCodeInsightManager(FViewerIndex);
    FViewerIndex := cInvalidIndex;
  end;
end;
注册其它接口都不会出错,但是只要注册这个接口后,退出IDE就会弹出读取rtl70.bpl的错误。
各位高人能不能指点一下使用IOTACodeInsightServices的时候,有什么地方需要注意的?是不是实现IOTACodeInsightServices接口的类
编写有什么特殊要求的?
Top
 




All times are GMT++8, the time now is 2024-11-24 11:16

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.006980 second(s), 8 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP