473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

WinSvc Q

Hi All, I have a winSvc and a worker class which actually does the JOB of
the Svc.
protected override void OnStart(string[] args)

{

_of=new FWorker();

_of.PreInit();

_of.Init();
}

protected override void OnStop()

{

_of.Uninit();
}

Here's the Problem

The FWorker class usually does some real heavy operation, due to which when
I start my Svc it hangs up since it starts the processing of the Worker
Class...

I want to create a way by which the Svc can be started/stopped without
intervention of the Worker Class... what I mean is Start and Stop event
should supersedes any actions by the WorkerClass. I think the way to achieve
is by spawning a thread of the FWorker Class

ThreadStart thSart=new ThreadStart(FWoker);

Problem is how to do windup actions currently in progress by the WorkerClass
when I want to Stop the Service? Or will the GC do the JOB? basically I want
a solid way of communication between the worker class and Service....Some
design suggestions would be highly appreciated. I know how to go with Mutex
etc...I have actually done with WaitForMultipleObjects back in VC++

TIA
Nov 16 '05 #1
0 1045

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Vai2000 | last post by:
Hi All, I am writing a winsvc which monitors file changes on two or more network paths...How can I accomplish this using the FileSystemWatcher? I know the above can be applied to Sub Directories...
2
by: Vai2000 | last post by:
Hi All, I am writing a winsvc which monitors file changes on two or more network paths...How can I accomplish this using the FileSystemWatcher? I know the above can be applied to Sub Directories...
9
by: Vai2000 | last post by:
Hi All, Here's a situation, I am trying to process some large Files via a Win Svc using FileMonitor. During the test process I tried copy and pasting a file in a folder and got an error saying...
3
by: Vai2000 | last post by:
hi all, I have a winsvc which reads of messages out an MSMQ. Can someone help with this problem. If my server goes down and comes back up my WinSvc doesn't picks up messages accumulated in the...
2
by: Vai2000 | last post by:
How do I add a dependency on a Win32 in C#? My WinSvc depends on MSMQ Service TIA
0
by: Vai2000 | last post by:
Hi All, I have a winSvc and a worker class which actually does the JOB of the Svc. protected override void OnStart(string args) { _of=new FWorker(); _of.PreInit();
15
by: JJ | last post by:
A current requirement I am facing is the all business objects be stateless remote components hosted in IIS. I am partial to web services myself. However, it is insisted that IIS hosted remoting be...
2
by: Vai2000 | last post by:
Hi All, I have an ASPX Application. Now I have to write a WinSvc which actually uses 95% of the functionality present in the aspx application. I was thinking of calling the aspx DLL from my WinSvc....
2
by: Vai2000 | last post by:
Can I have a WinSvc monitoring multiple MSMQ's? If not how shud I achieve this goal with 1 WinSvc... TIA
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.