How to invoke a method of an application in WIndows Service
-
Hi All, Please let me know how to invoke a method of an application in Windows service using Process Class of System.Diagnostics. I don't want to make use of Reflection. // Get all instances of Application running on the local Process[] localName = Process.GetProcessesByName("Application_Name"); foreach (Process proc in localName) { Console.WriteLine(proc.ToString()); Console.WriteLine(proc.Id); Console.WriteLine(proc.GetType()); } Using the above instance I have to call the method of the application. Noor hussain
-
Hi All, Please let me know how to invoke a method of an application in Windows service using Process Class of System.Diagnostics. I don't want to make use of Reflection. // Get all instances of Application running on the local Process[] localName = Process.GetProcessesByName("Application_Name"); foreach (Process proc in localName) { Console.WriteLine(proc.ToString()); Console.WriteLine(proc.Id); Console.WriteLine(proc.GetType()); } Using the above instance I have to call the method of the application. Noor hussain
Then you need to load the assembly using the methods in the System.Reflection namespace, not get a set of processes in the system.
Upcoming events: * Glasgow: Geek Dinner (5th March) * Edinburgh: Web Security Conference Day for Windows Developers (12th April) My: Website | Blog | Photos