Board index » delphi » WebBroswer

WebBroswer

Does anyone know how to dynamically check to see if the WebBrowser .dll exists
on a target system?

Scott

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

 

Re:WebBroswer


Scott,

var
   s : String;
begin
   SetLength(s, MAX_PATH);
   GetSystemDirectory(PChar(s), MAX_PATH);
   SetLength(s, StrLen(s));
   // I don't know what the actual WebBrowser DLL filename is...
   if FileExists(s + 'WebBrowser.DLL') then
     // it's there.
end;

Ken
--
Ken White
kwh...@westelcom.com

Clipper Functions for Delphi
http://members.aol.com/clipfunc/

Quote
j...@my-dejanews.com wrote:

> Does anyone know how to dynamically check to see if the WebBrowser .dll exists
> on a target system?

> Scott

> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

Re:WebBroswer


In article <35BE64EC.E754B...@westelcom.com>, Ken White
<kwh...@westelcom.com> writes

Quote
>Scott,

>var
>   s : String;
>begin
>   SetLength(s, MAX_PATH);
>   GetSystemDirectory(PChar(s), MAX_PATH);
>   SetLength(s, StrLen(s));
>   // I don't know what the actual WebBrowser DLL filename is...
>   if FileExists(s + 'WebBrowser.DLL') then
>     // it's there.
>end;

Tiny correction to this - the path returned by GetSystemDirectory does
not include a trailing backslash (unless the system directory happens to
be the root directory).

So you'd need to add something like this:

SetLength(s, StrLen(s));

if s[Length(s)] <> '\' then
  s := s + '\';

If FileExists(s + 'WebBrowser.dll') then ...
--
Jeremy Collins
Kansai Business Systems

(return address not altered 'coz I get spammed *whatever* I do!)

Re:WebBroswer


Hi Jeremy,

Thanks for correcting the omission. :-)

Ken
--
Ken White
kwh...@westelcom.com

Clipper Functions for Delphi
http://members.aol.com/clipfunc/

Quote
Jeremy Collins wrote:

> In article <35BE64EC.E754B...@westelcom.com>, Ken White
> <kwh...@westelcom.com> writes
> >Scott,

> >var
> >   s : String;
> >begin
> >   SetLength(s, MAX_PATH);
> >   GetSystemDirectory(PChar(s), MAX_PATH);
> >   SetLength(s, StrLen(s));
> >   // I don't know what the actual WebBrowser DLL filename is...
> >   if FileExists(s + 'WebBrowser.DLL') then
> >     // it's there.
> >end;

> Tiny correction to this - the path returned by GetSystemDirectory does
> not include a trailing backslash (unless the system directory happens to
> be the root directory).

> So you'd need to add something like this:

> SetLength(s, StrLen(s));

> if s[Length(s)] <> '\' then
>   s := s + '\';

> If FileExists(s + 'WebBrowser.dll') then ...
> --
> Jeremy Collins
> Kansai Business Systems

> (return address not altered 'coz I get spammed *whatever* I do!)

Re:WebBroswer


In article <35BE64EC.E754B...@westelcom.com>, Ken White
<kwh...@westelcom.com> writes

Quote
>Scott,

>var
>   s : String;
>begin
>   SetLength(s, MAX_PATH);
>   GetSystemDirectory(PChar(s), MAX_PATH);
>   SetLength(s, StrLen(s));
>   // I don't know what the actual WebBrowser DLL filename is...
>   if FileExists(s + 'WebBrowser.DLL') then
>     // it's there.
>end;

Hmm.... having found that, anyone know of a decent component to access
it? :)

Mata ne!
Robert
--
Robert Fahey  - robe...@iol.ie  
IRC/Quake2/TetriNET - 'Shinji-kun'
-Games Editor, dot-IE;               .-----.          
-Reviews Editor, GamePlay Magazine   | <*> |
-Site Editor, Gamer.ign.ie           '-----'
"I'm gonna die!" - Makoto Mizuhara
(or me playing Twinbee Taisen Puzzle Drama ;_;)

Re:WebBroswer


There's a nifty little freeware component -- GoToWeb -- on the Delphi
Super Page that will activate your system's default browser with a
designated page loaded.

Other Threads