Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Tool Running in Background

Hi

 

My tool depends upon my other tool running in the Background.

How to check whether my tool is running in the Background or not.

 --> Any API to List all the running Dlls in the Background.

 

Thanks

Gunjeet

5 REPLIES

Re: Tool Running in Background

You could use a MUTEX to check if you other process is running.

  1. at the start of the background process register a MUTEX
  2. at the end of the background process unregister the MUTEX
  3. your utility depending on the background process will check the existence of the MUTEX

A MUTEX is a regular Windows API feature so it is best to check MSDN for how to use it in you programming language.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Tool Running in Background

Do you just need a list of processes? https://msdn.microsoft.com/en-us/library/ms172711(v=vs.100).aspx

 

Mark Rief
Retired Siemens

Re: Tool Running in Background

Hi

 

I have  a Helping Tool that handles my UDOs while running in the Background  and there are other tools that work taking help from that running Helping Tool.

So for my other tools I have to check whether already my Helping Tool is running in the background or not.

 

The Helping tool is a StartUp DLL. I dont think I see my running Helping Tool in the Task Manager Processes. as it is running inside the Ugraf.

 

Simply, I can say I just want to know all the Dlls running same as when we go to

File->Utilities->Unload Shared Image

 

Thanks

Gunjeet

Solution
Solution
Accepted by topic author Gunjeet
‎04-11-2017 06:29 AM

Re: Tool Running in Background

From https://msdn.microsoft.com/en-us/library/hw29w7t1(v=vs.110).aspx

If you create a Mutex object using a constructor that accepts a name, it is associated with an operating-system object of that name.
Named system mutexes are visible throughout the operating system and can be used to synchronize the activities of processes.

To synchronize processes you are best using a MUTEX as I said before.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Tool Running in Background

Hi Stefan

 

Thanks a lot for the Help.

I will try the Mutex in my Code.

 

Gunjeet