🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages Started by Ozan Tue, 08 Aug 2006 11:57
Open With dialog
#3253
Author: Ozan
Date: Tue, 08 Aug 2006 11:57
9 lines
1148 bytes

I want to show "openwith" dialog for unknown file types. I use shellexecute.

ShellExecute(NULL,"openas",file_name,...) like this.

But this gives error. "there is no application for given filename extension".

How can show this dialog? thanks for help.
Re: Open With dialog
#3254
Author: 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);
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads