Click here to Skip to main content
15,923,689 members
Home / Discussions / C#
   

C#

 
GeneralRe: password hash between web forms and windows forms Pin
Heath Stewart5-Apr-04 11:30
protectorHeath Stewart5-Apr-04 11:30 
GeneralRe: password hash between web forms and windows forms Pin
Talal Sultan5-Apr-04 11:39
Talal Sultan5-Apr-04 11:39 
Generalsocket program Pin
Member 6910895-Apr-04 8:20
Member 6910895-Apr-04 8:20 
GeneralRe: socket program Pin
Heath Stewart5-Apr-04 9:35
protectorHeath Stewart5-Apr-04 9:35 
Generalsocket problem Pin
Member 6910895-Apr-04 8:16
Member 6910895-Apr-04 8:16 
GeneralUneable to stop tcp multithreaded server process Pin
michael.wikstrom5-Apr-04 8:02
michael.wikstrom5-Apr-04 8:02 
GeneralRe: Uneable to stop tcp multithreaded server process Pin
Heath Stewart5-Apr-04 9:34
protectorHeath Stewart5-Apr-04 9:34 
GeneralRe: Uneable to stop tcp multithreaded server process Pin
Spanky35-Apr-04 11:39
Spanky35-Apr-04 11:39 
Hi,

I presume your server is using a thread which continually listens on a port by running it on a thread.

Currently when you close your program down the lightweight process (the thread) continues to be executed.

In the applications "closing" event you need to ensure all threads running are interrupted and cleaned up.

Dont use the STOP method as it is very bad.. you could end up with part written data for the instance of the program.

Theres a pretty complete guide here on threads:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchusingthreads.asp[^]

Which is worth a glance, but for the quick solution do this in the closing event for the main form/application:

threadinstance.Interrupt();
GeneralRe: Uneable to stop tcp multithreaded server process Pin
scadaguy6-Apr-04 3:35
scadaguy6-Apr-04 3:35 
GeneralSystem.OutOfMemoryException on return from unmanaged code Pin
IOUATP5-Apr-04 7:22
IOUATP5-Apr-04 7:22 
GeneralRe: System.OutOfMemoryException on return from unmanaged code Pin
Heath Stewart5-Apr-04 9:31
protectorHeath Stewart5-Apr-04 9:31 
GeneralRe: System.OutOfMemoryException on return from unmanaged code Pin
IOUATP5-Apr-04 10:35
IOUATP5-Apr-04 10:35 
GeneralRe: System.OutOfMemoryException on return from unmanaged code Pin
Heath Stewart5-Apr-04 10:50
protectorHeath Stewart5-Apr-04 10:50 
GeneralRe: System.OutOfMemoryException on return from unmanaged code Pin
IOUATP5-Apr-04 10:59
IOUATP5-Apr-04 10:59 
GeneralRe: System.OutOfMemoryException on return from unmanaged code Pin
Heath Stewart5-Apr-04 11:23
protectorHeath Stewart5-Apr-04 11:23 
GeneralRe: System.OutOfMemoryException on return from unmanaged code Pin
IOUATP5-Apr-04 11:41
IOUATP5-Apr-04 11:41 
GeneralRe: System.OutOfMemoryException on return from unmanaged code Pin
Anonymous27-Apr-04 9:05
Anonymous27-Apr-04 9:05 
QuestionDouble Buffering Theme Image via pDC? Pin
Tristan Rhodes5-Apr-04 5:53
Tristan Rhodes5-Apr-04 5:53 
AnswerRe: Double Buffering Theme Image via pDC? Pin
Heath Stewart5-Apr-04 6:03
protectorHeath Stewart5-Apr-04 6:03 
GeneralRe: Double Buffering Theme Image via pDC? Pin
Tristan Rhodes5-Apr-04 8:38
Tristan Rhodes5-Apr-04 8:38 
AnswerRe: Double Buffering Theme Image via pDC? Pin
Heath Stewart5-Apr-04 6:42
protectorHeath Stewart5-Apr-04 6:42 
GeneralRe: Double Buffering Theme Image via pDC? Pin
Tristan Rhodes5-Apr-04 13:23
Tristan Rhodes5-Apr-04 13:23 
GeneralCorrection Pin
Tristan Rhodes5-Apr-04 13:28
Tristan Rhodes5-Apr-04 13:28 
GeneralArray of objects and Serialization Pin
pedro rivera5-Apr-04 5:41
pedro rivera5-Apr-04 5:41 
GeneralRe: Array of objects and Serialization Pin
Heath Stewart5-Apr-04 6:00
protectorHeath Stewart5-Apr-04 6:00 

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.