Article View: borland.public.cppbuilder.nativeapi
Article #9257How to evoke browser for local file relative to exe dir?
From: Randall Parker
Date: Tue, 20 Jul 2004 20:33
Date: Tue, 20 Jul 2004 20:33
20 lines
1915 bytes
1915 bytes
Suppose one is running an app. The app started from some directory. From that app how to evoke the default browser and pass it the path to a file that is relative to the dir that the exe is in? My question probably breaks into a few parts: 1) Can I assume that any path passed to a browser will be interpreted as being a relative path to the current exe? I'm guessing the answer is NO. So how to find out the path of the exe? 2) Is there a syntax for a local file URL that all browsers recognize? I see that IE doesn't do file:/// for files you open locally but Mozilla does use that syntax. 4) How to convert the local path to URL format with the backslashes converted to forward slashes? Is there a routine in a BCB or OS lib that will do this? 5) Is it necessary to do double quoting escapes for paths that have spaces in dir names? 6) Is there a way to tell the browser to open a new instance/window/tab rather than replace the current page of the browser with the new page?
Technical Details
Message-ID:
<40fd8196$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,cc0cc83f65df649b,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 20 Jul 2004 13:33:31 -0700 From: Randall Parker <STOPtechiepundit@EVILfuturePOXpunditSPAM.com> User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: How to evoke browser for local file relative to exe dir? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 4.40.49.194 Message-ID: <40fd8196$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090355606 4.40.49.194 (20 Jul 2004 13:33:26 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail