launching notes.exe

W

Workgroups

I have a pocket pc 2003 application (VB.NET) I'm building to manage a large
number of .pwi files via a calendar interface. This application needs the
ability to open the .pwi file, so I'm using CreateProcess to launch
"notes.exe", and supplying the appropriate filename as a command line
paremeter.

And this works, more or less; returning the user back to my application
after they're done with the .pwi file is somewhat clunky - ok, it's
non-existant. After the user closes the .pwi file, they must then
close/minimize the notes program to return to my application.

If one were to tap on a .pwi file from Explorer, this action results in a
more "streamlined" behavior that I would love to emulate. Tapping on a .pwi
file from Explorer launches the .pwi file into notes.exe, but when the .pwi
file is closed, notes.exe is terminated and I'm left back at Explorer.

I would describe the Explorer's behavior as "launching this .pwi file (with
notes.exe)" rather than "launching notes.exe (with this .pwi file)"... if
you follow me. The behavior is almost as if WaitForXXXProcess is monitoring
the .pwi file itself and not the notes application (although that's probably
not really possible).

But with CreateProcess, you are "launching notes.exe (and btw, open this
..pwi file)", so the open/close state of the .pwi file itself has little
bearing on whether or not we're done using notes - notes just keeps going,
because that's what we launched.

I have some ideas about how to solve this, but I have no idea if either of
them are possible:

1. Send some unbeknownst-to-me command-line parameter to notes during
CreateProcess that, in addition to specifying a file to open, also instructs
notes.exe to close itself when the specified file is closed. Is there a
list anywhere of possible command line parameters for notes.exe?

2. "Run.." the .pwi file (somehow?) similar to how one can "Run" an
associated file type in Windows XP. Is this at all possible?

3. Somehow programatically emulate the 'tapping' of the .pwi file from the
Explorer (that one's a long shot but if it works, I'll do it).

I have a strong disinterest in re-inventing the notes program myself, it
seems to make ultimate sense to harness notes.exe to manipulate the .pwi
files themselves, I just want to more gracefully transition between a .pwi
file in notes and my application. Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top