Click here to Skip to main content
15,915,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: use DefWindowProc in c# Pin
Carsten Zeumer5-Jun-05 10:12
Carsten Zeumer5-Jun-05 10:12 
GeneralRe: use DefWindowProc in c# Pin
Sasuko5-Jun-05 11:21
Sasuko5-Jun-05 11:21 
GeneralRe: use DefWindowProc in c# Pin
Carsten Zeumer5-Jun-05 11:33
Carsten Zeumer5-Jun-05 11:33 
GeneralRe: use DefWindowProc in c# Pin
Sasuko5-Jun-05 12:53
Sasuko5-Jun-05 12:53 
GeneralAccomplishing Listview Column Reorder Programmatically Pin
Hashir Zuberi5-Jun-05 0:24
Hashir Zuberi5-Jun-05 0:24 
GeneralSerialPort/Stress problem Pin
Snowjim5-Jun-05 0:23
Snowjim5-Jun-05 0:23 
GeneralRe: SerialPort/Stress problem Pin
S. Senthil Kumar5-Jun-05 4:01
S. Senthil Kumar5-Jun-05 4:01 
GeneralRe: SerialPort/Stress problem Pin
Snowjim5-Jun-05 4:14
Snowjim5-Jun-05 4:14 
Yes i understand what you mean, but thats why i am using lock so there will hofully be a sort av queue that executes the threads in the right order?

I have also tried to place the code that writes to file in the ReceivedEvent event direcly and take away the ThreadPool Thing. Like this:

<br />
lock (this)<br />
{<br />
if (RUNNING)<br />
{<br />
FILEHANDLING CODE HERE<br />
//ThreadPool.QueueUserWorkItem(new WaitCallback(onDataReceived));<br />
//currentRunningThreads++; // keep track of amount of thread currently working<br />
}<br />
}<br />


but this is not helping?

I have as a mentioned, tried to switch from event to a Thread Loop, and then the data cant be read in wrong order. But this results in same dataloses as with event and Threadpool.

If i understand you right, then the data will be in the file but on a diffrent place?

The CompareIt program that i am using to compare files, will show if data is moved to other parts of the txt file. And in thes cases when i have lost data, there is simply data missing from the recived file(it also got a smaller size then it would have if its contained all the data).

BestRegards
SnowJim
GeneralRe: SerialPort/Stress problem Pin
S. Senthil Kumar5-Jun-05 7:01
S. Senthil Kumar5-Jun-05 7:01 
GeneralRe: SerialPort/Stress problem Pin
Snowjim5-Jun-05 7:49
Snowjim5-Jun-05 7:49 
GeneralRe: SerialPort/Stress problem Pin
Sebastian Schneider5-Jun-05 20:07
Sebastian Schneider5-Jun-05 20:07 
GeneralRe: SerialPort/Stress problem Pin
Snowjim6-Jun-05 0:59
Snowjim6-Jun-05 0:59 
GeneralC# directory file-structure reading Pin
Steepy_dipper4-Jun-05 22:51
sussSteepy_dipper4-Jun-05 22:51 
GeneralRe: C# directory file-structure reading Pin
Carsten Zeumer4-Jun-05 23:33
Carsten Zeumer4-Jun-05 23:33 
GeneralRe: C# directory file-structure reading Pin
GaMBiT_KC4-Jun-05 23:34
GaMBiT_KC4-Jun-05 23:34 
GeneralSql Query Builder from an app Pin
Leyu4-Jun-05 20:43
Leyu4-Jun-05 20:43 
GeneralShort cut icons on a windows form Pin
Rinventive4-Jun-05 20:42
Rinventive4-Jun-05 20:42 
GeneralRe: Short cut icons on a windows form Pin
Carsten Zeumer4-Jun-05 23:46
Carsten Zeumer4-Jun-05 23:46 
GeneralRe: Short cut icons on a windows form Pin
Anonymous5-Jun-05 19:29
Anonymous5-Jun-05 19:29 
GeneralExchange the Language on a localized Windows Forms form Pin
Uwe Keim4-Jun-05 20:30
sitebuilderUwe Keim4-Jun-05 20:30 
Generalpls Provide C# code for the Visual Basic code Below Pin
monica2k4-Jun-05 18:00
monica2k4-Jun-05 18:00 
GeneralRe: pls Provide C# code for the Visual Basic code Below Pin
Chris Austin4-Jun-05 19:33
Chris Austin4-Jun-05 19:33 
GeneralRe: pls Provide C# code for the Visual Basic code Below Pin
WillemM5-Jun-05 0:58
WillemM5-Jun-05 0:58 
GeneralRe: pls Provide C# code for the Visual Basic code Below Pin
Robert Rohde5-Jun-05 1:39
Robert Rohde5-Jun-05 1:39 
GeneralRe: pls Provide C# code for the Visual Basic code Below Pin
Michael P Butler5-Jun-05 3:44
Michael P Butler5-Jun-05 3:44 

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.