Re: File Associations - Multiple Instances
- From: "<ctacke/>" <ctacke[@]opennetcf[dot]com>
- Date: Sat, 25 Nov 2006 13:18:30 -0500
Since the CF enforces singleton behavior before you get an opportunity to
intervene, you have to hack around it. The typical way I go is to hack the
window name to prevent multiple instances and use IPC to send the new path
to the existing instance as you suggest. Yes, it changed how it works in CF
2, but the principal remains the same. You can use the Environment class to
determine which you're running under when you launch.
--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--
"Martin" <sousoux@xxxxxxxxxxxxx> wrote in message
news:526659AC-A6F7-468F-8B15-C58E567FDE58@xxxxxxxxxxxxxxxx
Hi
I have a CF.Net small application which is set up with a file association.
I
click on a file of a certain type and my program loads fine and the
filename
is passed as an argument.
If I click on another file the previous window redisplays and the new file
is not loaded. This is the CF.Net single instance restriction at work.
Is there an accepted way to be able to pass or retrieve the new arguments
in
the old instance of the application? I've looked for documentation on this
but I haven't found any.
The ways of "hacking" multiple instances seem to have changed in CE 5.0
since the window class is now #NETCF_AGL_PARK_+pathtoapp and the window
title
blank. The old trick of changing the window title doesn't work. If that
did
work I'd use a named event + WM_COPYDATA but it seems that route is
closed. I
don't really want to have two *.exe's.
Thanks in advance for any suggestions.
.
- Follow-Ups:
- Re: File Associations - Multiple Instances
- From: Martin
- Re: File Associations - Multiple Instances
- Prev by Date: Deploying and accesing lots of images
- Next by Date: OutOfMemory exceptions with PictureBox control
- Previous by thread: Deploying and accesing lots of images
- Next by thread: Re: File Associations - Multiple Instances
- Index(es):
Relevant Pages
|