Article View: borland.public.cppbuilder.nativeapi
Article #6293shellExecute and Notepad wierdness..
From: Roddy Pratt
Date: Tue, 24 May 2005 09:57
Date: Tue, 24 May 2005 09:57
24 lines
1664 bytes
1664 bytes
I'm using ShellExecute to open a document specified by the user, from BCB5
on XP SP2
It works fine for most file types (eg spreadsheets, PDFs) and URLs.
But, when I try it with a .txt file, 'nothing obvious happens'. ShellExecute
returns 42 which is not an error code.
When I check in the task manager, there's a now a notepad.exe *process*
shown, but NOT a notepad application!
.txt files open fine with notepad from the desktop, either by doubleclicking
or selecting 'open'.
I'm confused!
- Roddy
int err = (int)
ShellExecute(Application->MainForm->Handle,"open",docname.c_str(),(params ==
"")? NULL:params.c_str(), NULL,0);
if (err <= 32)
...
Technical Details
Message-ID:
<4292fa85$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ca680fb605a9512,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Roddy Pratt" <roddy at spam fritter dot com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: shellExecute and Notepad wierdness.. Date: Tue, 24 May 2005 10:57:26 +0100 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 82.70.221.38 Message-ID: <4292fa85$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1116928645 82.70.221.38 (24 May 2005 02:57:25 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail