473,327 Members | 2,025 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,327 software developers and data experts.

Help onThreading and RaiseEvent ????

Dear all

I have an assembly named Comm.dll which is in charge of handling tcp communication. Inside that assembly I have function which is pooling every 500ms the TCP port for incoming data. That function as been place in a thread that we could named TH1
When data has been detected on TCP port, TH1 raise an event named DataArrive

Then I have a main application window which refer to that comm.dll assembly and whcih has a delegate function responding the DataArrive event raise by TH1. We will call that delegate function GetDataFromTh

When GetDataFromTh1 is called, I process the incoming data and depending of the arrive data I raise en event named DataProcessed inside that delegate function name

Doing this, it gets my all system hanging. Only the mouse is working.

The question is : do we have the right to raise an event in a delegate which is raise in a different thread.

WHat is really happenning and is there any other solution

Reagrds and thanks for your hel

Serge calderar
Maillefer S.

Jul 21 '05 #1
0 906

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

Similar topics

1
by: Guille | last post by:
Hi all! I'm having some weird behaviour in a .NET application i'm developing. I'll try to explain: I've created a Class that wraps an asynchronous socket. When connect callback is called, i...
8
by: Nicolas | last post by:
How do I do a RaiseEvent in csharp I'm ok in VB but csharp confused me a lot. ******* code ******** private FileSystemWatcher watcher = new FileSystemWatcher(); public delegate void...
4
by: Oceania | last post by:
Hi All, I did try using the sample code from the ADO.net forum to link one table, it is working fine. But, I got a problem when I tried to link all tables (20 tables)... Please help, thank...
2
by: Marty | last post by:
Hi, I hope you can help me with this one (my code is below my message). I have many clients connecting to my server. When any of them disconnect, something happen. This user get disconnect...
4
by: AMDRIT | last post by:
I am trying to understand Delegates and where/when to use them. I can see one potential use of a delegate (on form closing, set the cancel property in the event arguments.) Does anyone have a...
0
by: Kooshesh | last post by:
Hello, I have this loop in a function System.Threading.ThreadPool.SetMaxThreads(4, 4) For Each row As DataGridViewRow In DataGridView1.Rows If Not row.Cells(0).Value Is Nothing Then Dim...
0
by: ssabusivefw | last post by:
I am basically writing a server/client application. The client application starts on the login in form where the user is required to enter a user name and password. These are encrypted sent to the...
3
by: Martin | last post by:
Hi all, I'm having a problem when trying to raise an event in my custom control when a toolstripbutton enable state changes. The problem is that although the code to raise the event executes, my...
10
by: hzgt9b | last post by:
Using VS2005, VB.NET, I am developing a windows app. The application opens a couple of forms. While the forms are open I want to raise some events, such as logging errors - but I call RaiseEvent,...
4
by: Ty | last post by:
Hello all, I am creating a website in VS 2008 VB.net. On one of my pages I am using the Table control to make a type of calendar a IN/OUT board. The problem I found after I wrote all the code...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.