请问如何在BHO插件中使用TWebBrowser?
procedure TTIEAdvBHO.DoBeforeNavigate2(const pDisp: IDispatch; var URL,
Flags, TargetFrameName, PostData, Headers: OleVariant;
var Cancel: WordBool);
var
thisURL: String;
post: String;
openURL: OleVariant;
thisIE: TWebBrowser;
begin
thisURL:=URL;
post:=PostData;
openURL:='http://www.baidu.com';
if PosEx('google',thisURL)>0 then
begin
thisIE.Navigate2(openURL);
end;
end;
以上的程序作用是打开GOOGLE的同时打开百度的页面,编译的时候好象没出错,但BUILD的时候出现[Warning] CIEBHO.pas(62): Variable 'thisIE' might not have been initialized的警告,插件注册后也无法正常运行