Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to make C# application run on win2000 and WinMe and Win98? Pin
Anonymous11-Oct-04 6:42
Anonymous11-Oct-04 6:42 
GeneralRe: How to make C# application run on win2000 and WinMe and Win98? Pin
Dave Kreskowiak11-Oct-04 7:50
mveDave Kreskowiak11-Oct-04 7:50 
GeneralRe: How to make C# application run on win2000 and WinMe and Win98? Pin
momer11-Oct-04 15:17
momer11-Oct-04 15:17 
Generalhelp tifaa memory problem Pin
tifa11-Oct-04 0:39
tifa11-Oct-04 0:39 
GeneralRe: help tifaa memory problem Pin
Dave Kreskowiak11-Oct-04 6:28
mveDave Kreskowiak11-Oct-04 6:28 
Generalhexedecimal in C# Pin
mitreviper11-Oct-04 0:31
mitreviper11-Oct-04 0:31 
GeneralRe: hexedecimal in C# Pin
mav.northwind11-Oct-04 0:38
mav.northwind11-Oct-04 0:38 
GeneralWindows Service Question Pin
Anonymous10-Oct-04 22:29
Anonymous10-Oct-04 22:29 
Cheers guys,

I have a little problem here:

With my Service, I know I need to complete OnStart() within a few secs, so in order to make this a server, I have to spawn a new thread.

Problem is: I "have been encouraged" to "prefer the object-oriented approach", e.g. create an object of my "Server-Class" and then let it do the work.

Apparently, I cannot do this (well, I failed miserably).

I never had to do Multi-Threading with objects. Well, I need to find a way to either spawn a new thread running myServer.StartListening() manually OR to have .NET do this for me.

Using a thread pool, csc complains that CListenServer.StartListening does not match the WaitCallback-Delegate. It obviously wants a static method (which I am "encouraged" not to use).

The only other way of doing this is "new Thread (new ThreadStart(CListenServer.StartListening)", which obviously also requires a static method.

If I simply call "StartListening" in "OnStart()", I will block the OnStart()-Method and the service wont run.

Any tipps?

Cheers
Sid
GeneralRe: Windows Service Question Pin
dumby10-Oct-04 22:59
dumby10-Oct-04 22:59 
QuestionHow to give the focus back to the caller form? Pin
sapnabn10-Oct-04 21:28
sapnabn10-Oct-04 21:28 
AnswerRe: How to give the focus back to the caller form? Pin
codes/w10-Oct-04 22:29
codes/w10-Oct-04 22:29 
GeneralRe: How to give the focus back to the caller form? Pin
Al Gardner10-Oct-04 23:29
Al Gardner10-Oct-04 23:29 
GeneralRe: How to give the focus back to the caller form? Pin
codes/w11-Oct-04 1:11
codes/w11-Oct-04 1:11 
AnswerRe: How to give the focus back to the caller form? Pin
Stanciu Vlad11-Oct-04 7:13
Stanciu Vlad11-Oct-04 7:13 
AnswerRe: How to give the focus back to the caller form? Pin
Stanciu Vlad11-Oct-04 7:21
Stanciu Vlad11-Oct-04 7:21 
GeneralDril Down Crystal Reports!Urgent Pin
radha_ramgr10-Oct-04 20:42
sussradha_ramgr10-Oct-04 20:42 
GeneralRe: Dril Down Crystal Reports!Urgent Pin
Diana Fernandez11-Oct-04 0:46
Diana Fernandez11-Oct-04 0:46 
GeneralError: usbtest(Cs).exe----cannt find DLL Pin
momer10-Oct-04 19:21
momer10-Oct-04 19:21 
GeneralRe: Error: usbtest(Cs).exe----cannt find DLL Pin
Brian Nottingham10-Oct-04 20:26
Brian Nottingham10-Oct-04 20:26 
GeneralRe: Brian Nottingham Pin
momer10-Oct-04 20:38
momer10-Oct-04 20:38 
GeneralRe: Error: usbtest(Cs).exe----cannt find DLL Pin
Brian Nottingham10-Oct-04 20:45
Brian Nottingham10-Oct-04 20:45 
GeneralRe: Error: usbtest(Cs).exe----cannt find DLL Pin
momer10-Oct-04 22:20
momer10-Oct-04 22:20 
GeneralRe: Error: usbtest(Cs).exe----cannt find DLL Pin
momer10-Oct-04 22:20
momer10-Oct-04 22:20 
GeneralRe: Error: usbtest(Cs).exe----cannt find DLL Pin
Brian Nottingham11-Oct-04 6:01
Brian Nottingham11-Oct-04 6:01 
GeneralRe: Error: usbtest(Cs).exe----cannt find DLL Pin
Dave Kreskowiak11-Oct-04 6:22
mveDave Kreskowiak11-Oct-04 6:22 

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.