Re: block another program from running?
even if you can identify a process by not looking at its filename (ie internal name, original name, or some kind of signatures like crc2, etc) you will still have a problem in terms of performance, as far as i know. because constant polling for running applications may cause a lot overhead to the system.
i think what you need is a "notification/event" from the system that an application has started, somekind of a "hook" :D which i guess is not for .Net world. :(
:wave:
Re: block another program from running?
Quote:
Originally Posted by Thread1
...
i think what you need is a "notification/event" from the system that an application has started, somekind of a "hook" :D which i guess is not for .Net world. :(
:wave:
Regarding global hooking in C# look at this very interesting article
http://www.codeproject.com/KB/system...obalHooks.aspx this is a very nice approach to do global hooking, using C# with a small workarround using a very small part C++ ;)
Re: block another program from running?
Quote:
Originally Posted by Thread1
even if you can identify a process by not looking at its filename (ie internal name, original name, or some kind of signatures like crc2, etc) you will still have a problem in terms of performance, as far as i know. because constant polling for running applications may cause a lot overhead to the system.
i think what you need is a "notification/event" from the system that an application has started, somekind of a "hook" :D which i guess is not for .Net world. :(
:wave:
hmmm.. how do we look at the internal/original name of the filename? thanks
Re: block another program from running?
Quote:
Originally Posted by imin
hmmm.. how do we look at the internal/original name of the filename? thanks
you may use FileVersionInfo...
Code:
System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(@"filename");
MessageBox.Show(String.Format("Original Filename: {0}\rInternal Filename: {1}", fvi.OriginalFilename, fvi.InternalName));