Re: EnableShellOpen() for windows mobile
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Thu, 26 Oct 2006 10:03:19 -0700
Then I'd say that the application is at fault. If the app is not already
running, that will run the application and put
"\storage card\documents\mydocument.cod"
including the quotes, on the command line (assuming that's where you're
launching it from, of course). I've never seen that fail. Much more likely
that the application is not properly parsing the command line, is doing
something wrong concerning the fact that the command line is Unicode, or
whatever. How about, in WinMain, doing this:
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
MessageBox( NULL, lpCmdLine, _T( "Hello" ), MB_OK );
...
}
Paul T.
"stopin" <stopin@xxxxxxxxxxxxx> wrote in message
news:%23OaJb0R%23GHA.4388@xxxxxxxxxxxxxxxxxxxxxxx
Yes, this is what I have too in the Registry :
REGEDIT4
[HKEY_CLASSES_ROOT\.cod]
@="Waaves.Image"
But that still does not open the selected file, just launch the app...
--
ST
---------------------------
stopin@xxxxxxxxxxxxx
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> a écrit dans le message de news:
eTXNOtR%23GHA.4428@xxxxxxxxxxxxxxxxxxxxxxx
OK, that's all fine. Where do you associate the .cod extension with
Waaves.Image? You know, this part:
[HKEY_CLASSES_ROOT\.cod]
@="Waaves.Image"
Paul T.
"stopin" <stopin@xxxxxxxxxxxxx> wrote in message
news:%23BEYFFQ%23GHA.4980@xxxxxxxxxxxxxxxxxxxxxxx
This is an export of the '.cod' file association. The DefaultIcon works,
my application is launched when clicking a file.cod but still does not
open the associated file. Are you sure that I do not need to add anything
to the program itself?
Thanks again,
STN
============= REGEDIT4
[HKEY_CLASSES_ROOT\Waaves.Image] @="WaavesMobile.Document"
[HKEY_CLASSES_ROOT\Waaves.Image\DefaultIcon] @=\\Program
Files\\WaavesMobile\\WaavesMobile.exe, 0
[HKEY_CLASSES_ROOT\Waaves.Image\shell]
[HKEY_CLASSES_ROOT\Waaves.Image\shell\open]
[HKEY_CLASSES_ROOT\Waaves.Image\shell\open\command] @=""\\Program
Files\\WaavesMobile\\WaavesMobile.exe" "%1""
[HKEY_CLASSES_ROOT\Waaves.Image\shell\open\ddeexec] @="[open("%1")]"
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> a écrit dans le message de news:
%23rIiJjF%23GHA.3348@xxxxxxxxxxxxxxxxxxxxxxx
Do an Export of the section of the registry associated with .cod files
with
Remote Registry Editor, as what you have there doesn't tell me what I
need
to know to diagnose what's wrong.
Paul T.
"stopin" <stopin@xxxxxxxxxxxxx> wrote in message
news:u7Y1PAE%23GHA.4268@xxxxxxxxxxxxxxxxxxxxxxx
Thanks for your help Paul.
I tried to add manually registry keys using "Remote Registry Editor"
(from
MS Visual Studio 2005 package) but I still have the same issue.
Do I need to add something into the application itself to let it know
that
it can receive a file when it is launched (like EnableShellOpen)?
Here is what I put in the Registry:
[HKEY_CLASSES_ROOT\.cod] isce_codfile
[HKEY_CLASSES_ROOT\APPLICATION\WaavesMobile.exe\shell\open\command]
"\Program Files\CIRA\WaavesMobileSP\WaavesMobile.exe" "%1"
[HKEY_CLASSES_ROOT\isce_codfile\Shell\Open\Command] "\Program
Files\CIRA\WaavesMobileSP\WaavesMobile.exe" "%1"
Do I miss something?
The file format is a proprietary image format with '.cod' extension
The application is a viewer for this format, it is a Smart Device
application from Visual 2005 template in C++. The plateform is Windows
Mobile 5.0
Thanks in advance,
--
ST
---------------------------
stopin@xxxxxxxxxxxxx
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT
com> a écrit dans le message de news:
uya0H%2349GHA.1172@xxxxxxxxxxxxxxxxxxxxxxx
Your entry in the registry which makes the association does not provide
a
command line parameter to the application where the path and name of
the
file to be opened will be placed by the shell, probably. You've got
some
entry that looks a bit like this:
[HKEY_CLASSES_ROOT\<whatever>\Shell\Open\Command]
@="\"\\<exepath>\\<exename>.exe\" %1"
I think that the %1 might be missing.
Possibility #2 is that, although %1 is there, your application is not
handling it correctly because of spaces in the file path. You might
need
to put quotes around the name "%1" or you might need to adjust your
program to use the whole command line as the file name.
Possibility #3 is that your program was already running on the device,
if
it's a Pocket PC, this is particularly likely, and so the name of the
file doesn't get sent in the same way. If you're more-specific about
what program, what file, what the device is, what the state of running
programs are, we might be able to help more...
Paul T.
"stopin" <stopin@xxxxxxxxxxxxx> wrote in message
news:%23BnKET49GHA.360@xxxxxxxxxxxxxxxxxxxxxxx
Hi folks,
I am looking for the equivalent of CWinApp::EnableShellOpen( ) on
windows mobile 5.0 platform. I simply want to be able to open a file
with my application when selecting it in the Explorer.
I did the file type association in the install program (using
InstallShield) but when I select a file in the Explorer it only
launches
my application and doesn't open the file.
What did I miss?
Thanks in advance,
--
ST
---------------------------
stopin@xxxxxxxxxxxxx
.
- Follow-Ups:
- Re: EnableShellOpen() for windows mobile
- From: stopin
- Re: EnableShellOpen() for windows mobile
- References:
- EnableShellOpen() for windows mobile
- From: stopin
- Re: EnableShellOpen() for windows mobile
- From: Paul G. Tobey [eMVP]
- Re: EnableShellOpen() for windows mobile
- From: stopin
- Re: EnableShellOpen() for windows mobile
- From: Paul G. Tobey [eMVP]
- Re: EnableShellOpen() for windows mobile
- From: stopin
- Re: EnableShellOpen() for windows mobile
- From: Paul G. Tobey [eMVP]
- Re: EnableShellOpen() for windows mobile
- From: stopin
- EnableShellOpen() for windows mobile
- Prev by Date: Re: EnableShellOpen() for windows mobile
- Next by Date: Re: EnableShellOpen() for windows mobile
- Previous by thread: Re: EnableShellOpen() for windows mobile
- Next by thread: Re: EnableShellOpen() for windows mobile
- Index(es):
Relevant Pages
|