Hey guys,
I'm having trouble figuring this out, I saw this .exe that if you renamed it would give you an error. I tried to reproduce it but sadly it didn't work. I'm asking if anyone could point me out.
Thanks a lot.
Hey guys,
I'm having trouble figuring this out, I saw this .exe that if you renamed it would give you an error. I tried to reproduce it but sadly it didn't work. I'm asking if anyone could point me out.
Thanks a lot.
That's usually because the file has a lock on it for various reasons. There are tools like Unlocker which can be used to clear locks from a file.
Thanks for the reply but I want to include that in my program. So if anyone knows how to do it, can you point me to somewhere.
Don't know why you'd want to do that, but you could always do something as simple as GetModuleFileName, lop off at the last \\, then append your desired executable name to it. Then compare that string to the original; if the executable's name doesn't match, send a PostQuitMessage().