Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Getting current default browser in MSVC

Author
Message
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Aug 2004 00:38 Edited at: 23rd Aug 2004 00:48
Does anyone have any C code to detect the currently default web browser ?


Come to the UK Convention on the 23rd & 24th of October
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 23rd Aug 2004 00:47
Not code, but I assume it has to do with what app is associated with html and htm files.

AMD Athlon XP2800+
GeForce FX5200 128MB
1024MB DDR 333MHz RAM
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Aug 2004 00:48
Not really as they can be assigned anything.


Come to the UK Convention on the 23rd & 24th of October
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 23rd Aug 2004 01:25
You could check the registry
HKEY_CLASSES_ROOT\HTTP\shell\open\ddeexec\Application

Although currently Firefox for example doesn't set this value at all. Netscape does, however.

Play Nice! Play Basic! Out now.

nFinity Emulator. Coming soon.
Powersoft
21
Years of Service
User Offline
Joined: 1st Aug 2003
Location: United Kingdom
Posted: 23rd Aug 2004 01:41
for once theres something TCA doesnt have a DLL for.... lol


Scorched Turf --> Project Thread
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 23rd Aug 2004 01:58
Not for long

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Aug 2004 02:19 Edited at: 23rd Aug 2004 02:38
Quote: "HKEY_CLASSES_ROOTHTTPshellopenddeexecApplication"

No - doesn't change.


Come to the UK Convention on the 23rd & 24th of October
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 23rd Aug 2004 02:31
Then use HKEY_CLASSES_ROOT\http\shell\open\command (That's were Firefox checks if it's the default browser)
And for mail
HKEY_CLASSES_ROOT\mailto\shell\open\command

Play Nice! Play Basic! Out now.

nFinity Emulator. Coming soon.
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Aug 2004 02:38 Edited at: 23rd Aug 2004 02:52
Yes, the command section does change - I'll use that, thanks!

Now - another unrelated problem :

I'm trying to pass a UNC computer name (\\eastwood) as the first parameter of RegisterEventSource, but I always get an error number back of 1722 - The RPC server is unavailable.

What is causing this problem, and how can it be solved ?

I want to add event information to another computer (fine on local machines), but for some reason it fails. The only reason I can think of is lack of permissions (even though I am admin).


Come to the UK Convention on the 23rd & 24th of October
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 23rd Aug 2004 03:17
Quote: "(fine on local machines)"

Does it work on your local machine when you pass its UNC too, or only when you pass null?

Play Nice! Play Basic! Out now.

nFinity Emulator. Coming soon.
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Aug 2004 03:54
Unfortunately, no, UNC doesn't work on local machines either... NULL is the only thing that works.


Come to the UK Convention on the 23rd & 24th of October
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 23rd Aug 2004 04:10
Well, are you sure you use the correct name?
(Control Panel --> System --> Computer Name)
Cause that works here.

Play Nice! Play Basic! Out now.

nFinity Emulator. Coming soon.
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Aug 2004 04:20 Edited at: 23rd Aug 2004 04:29
The UNC failed on my home machine too - I might try it by IP address, as that seemed to work.


Come to the UK Convention on the 23rd & 24th of October
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 23rd Aug 2004 04:30 Edited at: 23rd Aug 2004 04:41
Yes. This computer isn't connected to a LAN, but this Delphi code works:



Play Nice! Play Basic! Out now.

nFinity Emulator. Coming soon.
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Aug 2004 06:07
It appears that permissions need to be setup for the event log on another computer, which is annoying...

I'll try by computer name again tomorrow (as I have to do it by IP address at home)


Come to the UK Convention on the 23rd & 24th of October

Login to post a reply

Server time is: 2024-09-22 12:26:58
Your offset time is: 2024-09-22 12:26:58