Is program XYZ running?

Discussion in 'Questions (Windows Mobile)' started by HARRY, Jan 10, 2008.

  1. HARRY

    HARRY Active Member Licensed 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
     
  2. dzt

    dzt Active Member Licensed User

    Attached Files:

  3. HARRY

    HARRY Active Member Licensed 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
     
  4. agraham

    agraham Expert Licensed 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?
     
  5. HARRY

    HARRY Active Member Licensed User

    Hallo Agraham,

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

    Harry
     
  6. agraham

    agraham Expert Licensed User

  7. vitramir

    vitramir Member Licensed User

    Hi,
    We can check when application is running. Can we check when dll is running?
     
  8. HARRY

    HARRY Active Member Licensed User

    Thanks Agraham!

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

    Harry
     
  9. HARRY

    HARRY Active Member Licensed 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
     
  10. dzt

    dzt Active Member Licensed User

    Hello Harry,

    No I never created a library with such a function. Maybe in the future.
     
  11. agraham

    agraham Expert Licensed User

    If you really need to do this you could synthesise it by

    FileCopy(OldFile, NewFile)
    FileDel(OldFile)
     
Loading...