Valhalla Legends Archive

Programming => General Programming => Topic started by: ioSys on August 09, 2007, 10:17 AM

Title: Set Process Name
Post by: ioSys on August 09, 2007, 10:17 AM
I have made an VB6 application that dont use any forms that is compiled to an .EXE file. I will run more instances of this application at the same time and wants to be able to stop the right one. Normally I cant see wich one is wich in "process explorer". Is it possible for me to set the name of the process when I start my application?

I can see that in the .VBP file there is a part: Title="SendApp" that defines the name of the process.

It would help me a lot if I was able to terminate the right one by being able to see what one is the one to terminate.
SendApp1
SendApp2
SendApp3

Sorry for bad english =)

Thanks in advance
Title: Re: Set Process Name
Post by: brew on August 10, 2007, 12:05 AM
I don't think there's absolutely way to tell apart the applications by their image name only (PID will help, though) and I don't think it's modifiable on runtime either.... sorry :/
Title: Re: Set Process Name
Post by: ioSys on August 10, 2007, 06:32 AM
Thanks for your reply. Anyone else that knows if what I want to do is possible or not?
Title: Re: Set Process Name
Post by: rabbit on August 10, 2007, 06:55 AM
You could write the app as ProcName____ or whatever and then write a loader that modifies the executable with a UID or something.
Title: Re: Set Process Name
Post by: raylu on August 10, 2007, 04:16 PM
http://www.microsoft.com/technet/sysinternals/Utilities/ProcessExplorer.mspx
procexp will show you when they were started, along with a ton of other information if you pick Properties from the context menu.
Title: Re: Set Process Name
Post by: ioSys on August 12, 2007, 01:54 AM
Quote from: rabbit on August 10, 2007, 06:55 AM
You could write the app as ProcName____ or whatever and then write a loader that modifies the executable with a UID or something.

Nice solution, Rabbit. It is not supposed to do it another "cleaner" way via API or such? I try this solution.

Raylu, I try that app. Even though it doesent solve my problem.

Thank you for helping!


Now my little loader is complete and working! =) Thanks for the help!