My Clarion emailtimer app relies on another app called “scanner.exe” to be running. It’s a vb.net application, and I have set it so that only one instance is running. I could just try executing “scanner.exe” on a regular basis, but that’s a horrible solution, and in other examples I would end up with hundreds of copies of the same app running until windows crashes.
In vb.net there is a function called GetProcessesByName(“scanner.exe”)
Member of System.Diagnostics.Process
In the windows32 PSAPI there are functions to enumerate the running processes. I have looked at the winapi by @Mike_Duglas but can’t find anything that matches.
I’m missing something really obvious here: what do I need to do to get the IsInstanceRunning method to work? If I just add this code to the main frame’s timer event I get errors complaining about no matching prototype. So clearly I haven’t included missing bits.
!// Timer event
if IsInstanceRunning('scanner.exe') then
I have searched in vain through the Clarion documentation and PDFs and found a cryptic reference to the WindowExtender class, but nothing further.
I have included the line INCLUDE('winext.inc'),ONCE in the “After Global INCLUDEs” global embed, but I’m not sure if that’s correct, and I don’t know whether to include winext.clw anywhere.