|
-
December 20th, 2007, 11:02 PM
#16
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" which i guess is not for .Net world.
Busy 
-
December 21st, 2007, 04:58 AM
#17
Re: block another program from running?
 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"  which i guess is not for .Net world.

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++
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
December 24th, 2007, 05:15 AM
#18
Re: block another program from running?
 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"  which i guess is not for .Net world.

hmmm.. how do we look at the internal/original name of the filename? thanks
-
December 25th, 2007, 09:31 PM
#19
Re: block another program from running?
 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));
Busy 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|