🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16846

Re: ShellExecute - crash on NT4

#16846
From: Remy Lebeau (TeamB)
Date: Tue, 22 Apr 2003 06:35
35 lines
2434 bytes
"Murray Nelson" <mnpicker@agt.net> wrote in message
news:3EA4C5ED.5050505@agt.net...
> Interesting. I wonder is there a place one can find
> some in depth information on shellexecute().

There's not much to tell about it.  You give it a filename, and it resolves
which type of file it is, based on the file extension.  Or in the case of
URLs, the protocol used.  Then it goes into the HKEY_CLASSES_ROOT section of
the Registry, looks to see if the file type is registered, and if so then
simply executes the command associated with the file type's registered verb
that is specified in the lpOperation parameter of ShellExecute().

So, for example, when executing a URL, the http protocol is registered as
follows:

    HKEY_CLASSES_ROOT\http\shell\open\command
    (Default)="F:\PROGRA~1\INTERN~2\iexplore.exe" -nohome

The URL passed to ShellExecute() will be passed to the web browser as a
command line parameter.  So, in this particular example, IE would be invoked
as such:

    F:\PROGRA~1\INTERN~2\iexplore.exe -nohome "http://theurl.com"

At startup, IE can look to see if it was passed any command-line parameters,
and if so then process them accordingly.

> Like included libraries?

ShellExecute(), like its name implies, is part of the OS Shell itself,
available in shell32.dll.


Gambit
Technical Details
Message-ID: <3ea4e282$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ea04c39$1@newsgroups.borland.com> <3EA47744.4010906@agt.net> <3ea4809d$1@newsgroups.borland.com> <3EA4C5ED.5050505@agt.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5c247afc24d17dcf
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-21 23:40:03 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ea04c39$1@newsgroups.borland.com> <3EA47744.4010906@agt.net> <3ea4809d$1@newsgroups.borland.com> <3EA4C5ED.5050505@agt.net>
Subject: Re: ShellExecute - crash on NT4
Date: Mon, 21 Apr 2003 23:35:41 -0700
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3ea4e282$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1050993282 207.175.226.26 (21 Apr 2003 23:34:42 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail