CnPack Forum » 技术板块灌水区 » 实现IOTACodeInsightServices接口的类向IDE注册后应该如果释放?一退出就会出错……


2010-4-28 23:32 Diroc
实现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接口的类
编写有什么特殊要求的?

页: [1]


Powered by Discuz! Archiver 5.0.0  © 2001-2006 Comsenz Inc.