Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: simple DataGridView question. Pin
zaboboa23-Oct-08 5:12
zaboboa23-Oct-08 5:12 
GeneralRe: simple DataGridView question. Pin
Ennis Ray Lynch, Jr.23-Oct-08 5:22
Ennis Ray Lynch, Jr.23-Oct-08 5:22 
Questionsending file through phone line Pin
Jassim Rahma23-Oct-08 4:47
Jassim Rahma23-Oct-08 4:47 
AnswerRe: sending file through phone line Pin
Ennis Ray Lynch, Jr.23-Oct-08 5:01
Ennis Ray Lynch, Jr.23-Oct-08 5:01 
AnswerRe: sending file through phone line Pin
#realJSOP23-Oct-08 6:06
professional#realJSOP23-Oct-08 6:06 
GeneralRe: sending file through phone line Pin
Jassim Rahma23-Oct-08 12:43
Jassim Rahma23-Oct-08 12:43 
GeneralRe: sending file through phone line Pin
Guffa23-Oct-08 14:46
Guffa23-Oct-08 14:46 
Question[2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 4:39
professionalVimalsoft(Pty) Ltd23-Oct-08 4:39 
Good Afternoon All

I have a Windows Service and its Task is to kill a process. the Service is accepting the name of the Process through a Application.Config file. The Service does not Kill the Process. Here is a code that kills the Process as long as the Process is running

namespace Process_Killer
{
    public partial class Process_Killer : ServiceBase
    {
        public Process_Killer()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            String Process_Kill = ConfigurationSettings.AppSettings.Get("Process"); 

            FindAndKillProcess("Process_Kill");

        }


        protected override void OnStop()
        {
            // TODO: Add code here to perform any tear-down necessary to stop your service.
        }


        public void FindAndKillProcess(String name)
        {
        
            Process[] procList = Process.GetProcessesByName(name);

            while (procList.Length > 0)
            {
                procList[0].Kill();
            }
        }
    }
}



What is Wrong ?



What is Wrong ?

Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding

VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za


AnswerRe: [2.0] Service does not Do its Job Pin
Wendelius23-Oct-08 4:48
mentorWendelius23-Oct-08 4:48 
GeneralRe: [2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 20:39
professionalVimalsoft(Pty) Ltd23-Oct-08 20:39 
AnswerRe: [2.0] Service does not Do its Job Pin
Mark Salsbery23-Oct-08 7:57
Mark Salsbery23-Oct-08 7:57 
GeneralRe: [2.0] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd23-Oct-08 19:40
professionalVimalsoft(Pty) Ltd23-Oct-08 19:40 
GeneralRe: [RESOLVED] Service does not Do its Job Pin
Vimalsoft(Pty) Ltd24-Oct-08 1:50
professionalVimalsoft(Pty) Ltd24-Oct-08 1:50 
GeneralRe: [RESOLVED] Service does not Do its Job Pin
Mark Salsbery24-Oct-08 4:32
Mark Salsbery24-Oct-08 4:32 
QuestionOracle... Pin
Stephen Lintott23-Oct-08 3:59
Stephen Lintott23-Oct-08 3:59 
QuestionRe: Oracle... Pin
led mike23-Oct-08 4:34
led mike23-Oct-08 4:34 
AnswerRe: Oracle... Pin
Wendelius23-Oct-08 4:51
mentorWendelius23-Oct-08 4:51 
GeneralRe: Oracle... Pin
Stephen Lintott23-Oct-08 5:02
Stephen Lintott23-Oct-08 5:02 
GeneralRe: Oracle... Pin
Wendelius23-Oct-08 7:30
mentorWendelius23-Oct-08 7:30 
QuestionSAPI 5.1 for speech recognition_SR engine threashold Pin
Member 398136623-Oct-08 3:35
Member 398136623-Oct-08 3:35 
QuestionDelegates Pin
geekfromindia23-Oct-08 3:32
geekfromindia23-Oct-08 3:32 
AnswerRe: Delegates Pin
Ennis Ray Lynch, Jr.23-Oct-08 3:45
Ennis Ray Lynch, Jr.23-Oct-08 3:45 
QuestionHow to pass a groupbox from a class to other class Pin
TALHAKOSEN23-Oct-08 3:15
TALHAKOSEN23-Oct-08 3:15 
AnswerRe: How to pass a groupbox from a class to other class Pin
Tom Deketelaere23-Oct-08 3:28
professionalTom Deketelaere23-Oct-08 3:28 
GeneralRe: How to pass a groupbox from a class to other class Pin
TALHAKOSEN23-Oct-08 19:43
TALHAKOSEN23-Oct-08 19:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.