🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Open With dialog

#3254
From: Bob Gonder
Date: Tue, 08 Aug 2006 15:01
19 lines
1779 bytes
Ozan wrote:

>I want to show "openwith" dialog for unknown file types. I use shellexecute.
>But this gives error. "there is no application for given filename extension".
>
>How can show this dialog? thanks for help.

Check your registry.  Mine shows this command (one line) :
%SystemRoot%\system32\rundll32.exe
%SystemRoot%\system32\shell32.dll,OpenAs_RunDLL %1

which brings us to this code:
>	char	rundll[] = "c:\\windows\\system32\\rundll32.exe";
>	char	params[] = "c:\\windows\\system32\\shell32.dll,OpenAs_RunDLL c:\\fullpath\\filename";
>	ShellExecute(NULL,"open",rundll,params,NULL,SW_SHOWNORMAL);
Which also runs as
>	char	rundll[] = "rundll32.exe";
>	char	params[] = "shell32.dll,OpenAs_RunDLL c:\\fullpath\\filename";
>	ShellExecute(NULL,"open",rundll,params,NULL,SW_SHOWNORMAL);
Technical Details
Message-ID: <da6hd2pdt8t3hh6mnblrlik4bsnramopur@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44d87c11$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a138a0993de9579
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Open With dialog
Date: Tue, 08 Aug 2006 08:01:12 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <da6hd2pdt8t3hh6mnblrlik4bsnramopur@4ax.com>
References: <44d87c11$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 71.0.35.222
X-Trace: newsgroups.borland.com 1155049271 71.0.35.222 (8 Aug 2006 08:01:11 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail