Is program XYZ running?

HARRY

Active Member
Licensed User
Longtime User
Hi everybody,

I am developing a number of small programs to compensate the short comings of a large application. Those programs will work on data files used by that application.

As I do not know how that application internally works and whether concurrent access to the data files may cause problems, I want to check whether that application is running.

Does a more simple way exist than using MortScript?

I do not like the complication of getting feed back from Mortscript and the additional distribution effort of my application.

Harry
 

HARRY

Active Member
Licensed User
Longtime User
Dimitri,

Thanks for the prompt reply. However, I encounter a problem compiling the sample program for the device. The following (translated) message is given:
____________________________________________________________
External Compiler Error

Error compiling program.

Error message : error CS0103

The name nulld does not exist in the current context
Line number: 8
If dzhw.GetWindowHandle("null", "Rekenmachine") > 0 Then
_____________________________________________________________

The word nulld is not a typing error.

Any idea what is going wrong?

Harry
 

agraham

Expert
Licensed User
Longtime User
"null" is probably wrong as there will be no windows classes called "null". You probably want an empty string "" instead. However this should not cause a compile time error, and in fact

If dzhw.GetWindowHandle("null", "Rekenmachine") > 0 Then
....
End If

compiles and runs fine for me in both legacy and optimised compilers. Are you sure there isn't a typo, like a missing quote, in the GetWindowHandle line?
 

HARRY

Active Member
Licensed User
Longtime User
Hallo Agraham,

What are the version and date of the dzHW.dll and dzHWDesktop.dll you are working with?

Harry
 

HARRY

Active Member
Licensed User
Longtime User
Thanks Agraham!

With the latest version of the dll's it works fine.

Harry
 

HARRY

Active Member
Licensed User
Longtime User
Hallo Dimitris,

Just a small question. It seems to me that you build your own libraries. Did you ever create a library which contains the function to rename a file, like: rename [Drive:][Path] filename1 filename2?

Harry
 
Top