I
iamy
Unregistered / Unconfirmed
GUEST, unregistred user!
求教:
在webborwser中,我想重载Invoke方法实现禁止webbrowser的脚本调试应该怎么做?
谢谢!
//在TEmbeddedWB中通过重载此方法实现对外围环境参数的设置
function TEmbeddedWB.Invoke(DispID: Integer;
const IID: TGUID;
LocaleID: Integer;
Flags: Word;
var Params;
VarResult, ExcepInfo,
ArgErr: Pointer): HResult;
begin
Result := S_OK;
if (Flags and DISPATCH_PROPERTYGET <> 0) and (VarResult <> nil) and
(DispId = DISPID_AMBIENT_DLCONTROL) then
PVariant(VarResult)^ := FDownloadOptionValue
else
if Assigned(FOnInvoke) then
Result := FOnInvoke(DispId, IID, LocaleID, Flags, TagDispParams(Params),
VarResult, ExcepInfo, ArgErr)
else
Result := inherited Invoke(DispID, IID, LocaleID, Flags, Params,
VarResult, ExcepInfo, ArgErr);
end;
在webborwser中,我想重载Invoke方法实现禁止webbrowser的脚本调试应该怎么做?
谢谢!
//在TEmbeddedWB中通过重载此方法实现对外围环境参数的设置
function TEmbeddedWB.Invoke(DispID: Integer;
const IID: TGUID;
LocaleID: Integer;
Flags: Word;
var Params;
VarResult, ExcepInfo,
ArgErr: Pointer): HResult;
begin
Result := S_OK;
if (Flags and DISPATCH_PROPERTYGET <> 0) and (VarResult <> nil) and
(DispId = DISPID_AMBIENT_DLCONTROL) then
PVariant(VarResult)^ := FDownloadOptionValue
else
if Assigned(FOnInvoke) then
Result := FOnInvoke(DispId, IID, LocaleID, Flags, TagDispParams(Params),
VarResult, ExcepInfo, ArgErr)
else
Result := inherited Invoke(DispID, IID, LocaleID, Flags, Params,
VarResult, ExcepInfo, ArgErr);
end;