Click here to Skip to main content
15,898,035 members
Home / Discussions / C#
   

C#

 
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 
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 
Your code makes no sense as a service.

You only attempt to find and kill the process once when the service starts,
then you do nothing except loop endlessly trying to kill the same process
over and over again (and consuming pretty much all the CPU cycles for a processor).
What if there's more than one process of the same name running?

Not returning from OnStart() prevents the service from starting.

If you intend your service to stay running and watch for that process and kill it,
you need to start a thread to do that. You can start the thread in OnStart().
You also need to kill ALL the processes in the procList then reload the procList
to check for new instances. You should also sleep a bit in that loop if you're going to
use a loop like that.

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

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 
QuestionUploading a file to an FTP server using C# Pin
srinivaskonijeti23-Oct-08 3:10
srinivaskonijeti23-Oct-08 3:10 
QuestionRe: Uploading a file to an FTP server using C# Pin
josephbhaskar23-Oct-08 3:54
josephbhaskar23-Oct-08 3:54 
QuestionPersonlisation and Shared View Pin
Adeel Shahid23-Oct-08 3:02
Adeel Shahid23-Oct-08 3:02 

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.