Recent

Author Topic: Program not terminating on Windows 10  (Read 13205 times)

scamb09

  • New Member
  • *
  • Posts: 10
Re: Program not terminating on Windows 10
« Reply #15 on: June 05, 2016, 06:32:41 pm »
I understand.

I'm creating a LPK similar to UniqueInstance, with more options, like instances counting and limit them to a license, stop the first and continue the job from next instances, and some more useful things for me.

If your problem persists, maybe I can finish my package including a solution for your case.

Please, sorry by my poor english.

How easy was that, problem solved! O:-)

Many thanks for this simple to use component, and if you do finish your version I will be interested.

Again, many thanks to you all.

scamb09.

scamb09

  • New Member
  • *
  • Posts: 10
Re: Program not terminating on Windows 10
« Reply #16 on: June 05, 2016, 06:41:41 pm »
You could try using SendMessageTimeout().
Code: Pascal  [Select][+][-]
  1. var
  2.   Dummy: DWORD;
  3. //...
  4.   if GetLastError = ERROR_ALREADY_EXISTS then
  5.   begin
  6.     //Windows.SendMessageTimeout(HWND_BROADCAST, AppMessage, 0, 0);
  7.     Windows.SendMessageTimeout(HWND_BROADCAST, AppMessage, 0, 0, SMTO_NORMAL or SMTO_ABORTIFHUNG, 1000, Dummy);
  8.     Exit;
  9.   end;

Fantastic, this also works, you guys are great, now I have two solutions.

Many thanks all.

scamb09.

 

TinyPortal © 2005-2018