Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type
- TWebBrowser = class(SHDocVw.TWebBrowser, IDispatch)
- private
- function GetTypeInfoCount(out Count: Integer): HRESULT; stdcall;
- function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HRESULT; stdcall;
- function GetIDsOfNames(const IID: TGUID; Names: Pointer;
- NameCount, LocaleID: Integer; DispIDs: Pointer): HRESULT; stdcall;
- function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer;
- Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HRESULT; stdcall;
- end;
- implementation
- { TWebBrowser }
- function TWebBrowser.GetIDsOfNames(const IID: TGUID; Names: Pointer; NameCount, LocaleID: Integer; DispIDs: Pointer): HRESULT;
- begin
- Result := inherited;
- end;
- function TWebBrowser.GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HRESULT;
- begin
- Result := inherited;
- end;
- function TWebBrowser.GetTypeInfoCount(out Count: Integer): HRESULT;
- begin
- Result := inherited;
- end;
- function TWebBrowser.Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; Flags: Word; var Params; VarResult, ExcepInfo,
- ArgErr: Pointer): HRESULT;
- begin
- if (Flags and DISPATCH_PROPERTYGET <> 0) and Assigned(VarResult) and
- (DispId = DISPID_AMBIENT_DLCONTROL) then
- begin
- // here you don't specify DLCTL_BGSOUNDS control flag
- PVariant(VarResult)^ := DLCTL_DLIMAGES or DLCTL_VIDEOS;
- Result := S_OK;
- end
- else
- Result := inherited;
- end;
Advertisement
Add Comment
Please, Sign In to add comment