Automatic Logoff of CW App after Inactivity

All methods to detect inactivity are based on some system counters which are global for every user process. If process runs under debugger and some debug event occurs, execution of all process threads is suspending until the debugger calls the ContinueDebugEvent function. This call resumes execution of the thread caused the debug event explicitly and other process threads implicitly. So, the program can be in the state with all its threads suspended for indefinite time. In my personal experience there were debug sessions lasting 5-6 days.

1 Like

So what you are saying is the debugger could hang these global counters that affect all and any other app including non clarion apps. Is that correct?

I havent tested this yet, but do you know if this is on a per machine basis or a per user basis? Do you know if this would affect virtual machines running on an affected machine?

No. If the program runs under debugger, measurements based on system counters not reflect real activity with this program.

I’m not sure about virtual machines but counters using to measure time (GetTickCount, QueryPerformanceCounter, etc.) are system wide => they are per running instance of OS.

1 Like

Nettalk has a option to close all active connections. That works for us.

Marius, but do you use it to shutdown app after certain time of inactivity?

The nettalk option is an explicit call by you to shutdown.
There is a demo that I used that lets you send a message first then shutdown.
I usually give a 5 min warning, with messages sent every miniute to let them save and exit before I kill.

1 Like

Yes, I’m aware of that NetTalk option but the catch is more/less in the trigger (detection of true “idleness”), so I’ll be trying out all the suggested and see what fits…