Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Is program XYZ running?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-10-2008, 08:18 AM
Knows the basics
 
Join Date: Apr 2007
Location: Netherlands
Posts: 86
Default Is program XYZ running?

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
Reply With Quote
  #2 (permalink)  
Old 01-10-2008, 09:56 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi,

To see if an application is running you can use this library (latest version) Useful Library

Attached is a small sample. Full sample showing all the functionality can be found here dzSpy - Spy and Task Manager App - Open Source
Attached Files
File Type: sbp test08_2nd_Launch.sbp (431 Bytes, 24 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #3 (permalink)  
Old 01-10-2008, 01:50 PM
Knows the basics
 
Join Date: Apr 2007
Location: Netherlands
Posts: 86
Default

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
Reply With Quote
  #4 (permalink)  
Old 01-10-2008, 02:33 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,470
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

"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?
Reply With Quote
  #5 (permalink)  
Old 01-10-2008, 02:54 PM
Knows the basics
 
Join Date: Apr 2007
Location: Netherlands
Posts: 86
Default

Hallo Agraham,

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

Harry
Reply With Quote
  #6 (permalink)  
Old 01-10-2008, 03:00 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,470
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by HARRY View Post
What are the version and date of the dzHW.dll and dzHWDesktop.dll you are working with?
dhz_HW3.zip - Post 15 here Useful Library
Reply With Quote
  #7 (permalink)  
Old 01-10-2008, 03:06 PM
Junior Member
 
Join Date: Dec 2007
Posts: 21
Send a message via Skype™ to vitramir
Default

Hi,
We can check when application is running. Can we check when dll is running?
Reply With Quote
  #8 (permalink)  
Old 01-10-2008, 04:11 PM
Knows the basics
 
Join Date: Apr 2007
Location: Netherlands
Posts: 86
Default

Thanks Agraham!

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

Harry
Reply With Quote
  #9 (permalink)  
Old 01-11-2008, 08:25 AM
Knows the basics
 
Join Date: Apr 2007
Location: Netherlands
Posts: 86
Default

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
Reply With Quote
  #10 (permalink)  
Old 01-12-2008, 11:20 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hello Harry,

No I never created a library with such a function. Maybe in the future.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
running an other applikation Georg Questions & Help Needed 2 04-29-2008 06:01 AM
prevent running same app twice Put Claude Share Your Creations 0 02-03-2008 03:01 PM
Running other apps Ianmac Questions & Help Needed 2 12-16-2007 02:30 PM
running .cab files from a program on the device Louis Questions & Help Needed 1 11-13-2007 06:18 AM
running in background tvrman Questions & Help Needed 15 08-24-2007 03:37 AM


All times are GMT. The time now is 11:45 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0