Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview Wiki

wsendto.exe - How does it select the running instance?

Last post 03-11-2020, 0:52 by Brian Fluet. 5 replies.
Sort Posts: Previous Next
  •  03-09-2020, 21:50

    • Brian Fluet is not online. Last active: 04-08-2020, 19:19 Brian Fluet
    • Top 10 Contributor
    • Joined on 12-24-2014
    • North Carolina, USA
    • SuperStar
    • Points 29,835

    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?

     

  •  03-10-2020, 0:41

    • idw is online. Last active: Thu, Apr 09 2020, 0:06 idw
    • Top 10 Contributor
    • Joined on 03-25-2007
    • Germany
    • SuperStar
    • Points 49,020
    • BetaTeam

    Re: wsendto.exe - How does it select the running instance?

    Brian Fluet:
    Does anyone know how WSENDTO selects the running instance it starts the new message in?

    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?


    Michael

    --
    PGP Key ID (RSA 2048): 0xC45D831B
    PGP Plugin for Pegasus Mail: <http://www.pmpgp.de/pmpgp/>
    S/MIME Certificate Fingerprint: 94 c6 b4 71 0c 62 30 88 a5 b2 77 01 74 2b 86 66 3b 7e 65 7c
  •  03-10-2020, 1:34

    • Brian Fluet is not online. Last active: 04-08-2020, 19:19 Brian Fluet
    • Top 10 Contributor
    • Joined on 12-24-2014
    • North Carolina, USA
    • SuperStar
    • Points 29,835

    Re: wsendto.exe - How does it select the running instance?

    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.
  •  03-10-2020, 21:46

    • Brian Fluet is not online. Last active: 04-08-2020, 19:19 Brian Fluet
    • Top 10 Contributor
    • Joined on 12-24-2014
    • North Carolina, USA
    • SuperStar
    • Points 29,835

    Re: wsendto.exe - How does it select the running instance?

    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. 


     

  •  03-10-2020, 23:45

    • David Harris is not online. Last active: 04-03-2020, 19:26 David Harris
    • Top 25 Contributor
    • Joined on 01-31-2007
    • New Zealand
    • Star
    • Points 10,020
    • SystemAdministrator

    Re: wsendto.exe - How does it select the running instance?

    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 --

  •  03-11-2020, 0:52

    • Brian Fluet is not online. Last active: 04-08-2020, 19:19 Brian Fluet
    • Top 10 Contributor
    • Joined on 12-24-2014
    • North Carolina, USA
    • SuperStar
    • Points 29,835

    Re: wsendto.exe - How does it select the running instance?

    Thank you David!
View as RSS news feed in XML

Contact | Advertise | Host provider: PraktIT | Terms of Use | Privacy Statement
Copyright © 2007-2011 David Harris / Peter Strömblad. | Pegasus Mail Home Page