Community Discussions and Support
wsendto.exe - How does it select the running instance?

The issue of which running instance of PMail is invoked by WSENDTO has been discussed before and in Win7 could reliably be counted on to be the last instance invoked.  This is not the case under Win10, at least not for me, so I'm trying to see if I can figure out a way to control it.  Does anyone know how WSENDTO selects the running instance it starts the new message in?

 

<p>The issue of which running instance of PMail is invoked by WSENDTO has been discussed before and in Win7 could reliably be counted on to be the last instance invoked.  This is not the case under Win10, at least not for me, so I'm trying to see if I can figure out a way to control it.  Does anyone know how WSENDTO selects the running instance it starts the new message in?</p><p> </p>

[quote user="Brian Fluet"]Does anyone know how WSENDTO selects the running instance it starts the new message in? [/quote]

IMO only David Harris can answer this question. But I assume the Registry is the place this information is taken from and if so I wonder why this shouldn't work anymore under Win 10?

<p>[quote user="Brian Fluet"]Does anyone know how WSENDTO selects the running instance it starts the new message in? [/quote]</p><p>IMO only David Harris can answer this question. But I assume the Registry is the place this information is taken from and if so I wonder why this shouldn't work anymore under Win 10? </p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

I assumed it would be one of the HKCU reg entries which, on the occasions when I've check, reflect the last started instance.  Things are getting busy at the office so I haven't found the time to really analyze those reg entry changes with each instance started. I don't know whether it will help though because I start three instances in the same sequence every day and the one invoked by wsendto is random but the second instance is the favorite.  I even did a system restart today just to see if the instance invoked would change to the last (3rd) started instance but #2 remained.

I assumed it would be one of the HKCU reg entries which, on the occasions when I've check, reflect the last started instance.  Things are getting busy at the office so I haven't found the time to really analyze those reg entry changes with each instance started. I don't know whether it will help though because I start three instances in the same sequence every day and the one invoked by wsendto is random but the second instance is the favorite.  I even did a system restart today just to see if the instance invoked would change to the last (3rd) started instance but #2 remained.

I did some testing this afternoon but remain clueless as to how wsendto.exe selects the running instance of Pegasus Mail to invoke. 

About the only thing I believe I have confirmed is that when no instance is running it invokes the instance identified in the registry keys in HKEY_CURRENT_USER\Software\Pegasus Mail. 


 

<p>I did some testing this afternoon but remain clueless as to how wsendto.exe selects the running instance of Pegasus Mail to invoke.  </p><p>About the only thing I believe I have confirmed is that when no instance is running it invokes the instance identified in the registry keys in HKEY_CURRENT_USER\Software\Pegasus Mail.  </p> <p> </p>

Having checked the source code for WSendTo, I can confirm that it simply uses the first instance it can find (it calls EnumWindows to go through the open top-level windows in the system and looks for the first one it can find that has a caption bar that starts with "Pegasus Mail").

I suspect that when I wrote it (way back in 2000) I just didn't think of the issue of multiple running instances, or if I did, I put it in the "I'll come back and fix it later" basket, but never did.

A small pop-up window listing the possible choices should be a very easy thing to add - I've made a note of it and will try to get it done for the interim release I'll be bringing out to address the OAUTH2 fiasco.

Cheers!

-- David --

Having checked the source code for WSendTo, I can confirm that it simply uses the first instance it can find (it calls EnumWindows to go through the open top-level windows in the system and looks for the first one it can find that has a caption bar that starts with "Pegasus Mail"). I suspect that when I wrote it (way back in 2000) I just didn't think of the issue of multiple running instances, or if I did, I put it in the "I'll come back and fix it later" basket, but never did. A small pop-up window listing the possible choices should be a very easy thing to add - I've made a note of it and will try to get it done for the interim release I'll be bringing out to address the OAUTH2 fiasco. Cheers! -- David --
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft