muXed
New Member
Posts: 15
|
Post by muXed on Jan 13, 2022 7:46:56 GMT -5
Hi Guys.
Is it possible to detect whether a certain process name is running already? (such as lb.exe)
Can't say i've come across it before in LB; and don't really know where to start.
Thanks
|
|
|
Post by Rod on Jan 13, 2022 8:51:09 GMT -5
|
|
|
Post by klewlis on Jan 14, 2022 10:24:34 GMT -5
Not sure exactly what the question is, but MutEx is short for mutually exclusive. It is designed to allow you to prevent a second instance of your program. If you want to be sure that a user cannot start a second instance of your program, then this is the way to go.
If you are looking to see if another program is already open on a system, and your program is not the program you are looking for, you could use enumWindows API. You would then search the array of enumerated windows for the one you are looking for. This would only work if the process you are looking for actually has an open window. I will leave it to others to explain the use of this API, but I am sure you can find it at Alyce's Restaurant. She has always been way better than I am at explaining the use of the API.
If you are looking for a process that does not have a window, (background process), then I am unable to even guess at a solution.
|
|