Click here to Skip to main content
15,920,053 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Questionstore procedure Pin
manjusha s26-May-09 21:33
manjusha s26-May-09 21:33 
AnswerRe: store procedure Pin
Pete O'Hanlon26-May-09 21:45
mvePete O'Hanlon26-May-09 21:45 
AnswerRe: store procedure Pin
saanj28-May-09 3:03
saanj28-May-09 3:03 
QuestionHow to override the message loop in winforms? Pin
Felix Collins26-May-09 17:56
Felix Collins26-May-09 17:56 
AnswerRe: How to override the message loop in winforms? Pin
Pete O'Hanlon26-May-09 21:39
mvePete O'Hanlon26-May-09 21:39 
GeneralRe: How to override the message loop in winforms? Pin
Felix Collins27-May-09 16:55
Felix Collins27-May-09 16:55 
GeneralRe: How to override the message loop in winforms? Pin
Luc Pattyn27-May-09 17:20
sitebuilderLuc Pattyn27-May-09 17:20 
GeneralRentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins27-May-09 18:12
Felix Collins27-May-09 18:12 
Yeah, it is not ideal.

As there seem to be so many helpful knowledgeable people on here, I'll describe the actual problem I'm trying to solve and see if there are any other ideas.

The problem I'm having is that inside one of my event handlers I'm calling some DirectShow code. Inside the DirectShow code a message loop is run to handle the COM calls. Unfortunately this inner message loop pumps my input events so if I click quickly with the mouse I can get a second event handler running nested inside the first at the point of the DirectShow call. I'm not sure what the correct term is for this behaviour so I am calling it reentrant event processing (although it is not strictly rentrancy as the event handlers are likely to be different ones). The problem arises because all the event handler code assumes that it is single threaded (which it is) and that events will be processed in order from the queue. I get unpredictable crashes of my application due to this problem.

One solution I am looking at is to simply discard user input messages and timer messages while a message is being processed, hence the original topic of this thread.

Another more complicated but better solution is to run a second thread with it's own message loop and invoke the COM calls on that thread. I haven't looked into the details of this too much as yet.

I've got a simple project that demonstrates the problem which I can post if anyone would like to see it.

Thanks for your help!

regards,
Felix
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
dybs29-May-09 17:10
dybs29-May-09 17:10 
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins31-May-09 12:49
Felix Collins31-May-09 12:49 
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins7-Jun-09 16:33
Felix Collins7-Jun-09 16:33 
QuestionNATUPNPLib - Which local IP to use? Pin
Andrey U26-May-09 11:42
Andrey U26-May-09 11:42 
AnswerRe: NATUPNPLib - Which local IP to use? Pin
Dave Kreskowiak27-May-09 7:42
mveDave Kreskowiak27-May-09 7:42 
QuestionEven targeting 3.5, metadata version v2.0.50727 ? Pin
GuimaSun26-May-09 9:17
GuimaSun26-May-09 9:17 
AnswerRe: Even targeting 3.5, metadata version v2.0.50727 ? Pin
Dave Kreskowiak26-May-09 9:23
mveDave Kreskowiak26-May-09 9:23 
GeneralRe: Even targeting 3.5, metadata version v2.0.50727 ? Pin
GuimaSun26-May-09 10:01
GuimaSun26-May-09 10:01 
GeneralRe: Even targeting 3.5, metadata version v2.0.50727 ? Pin
Dave Kreskowiak26-May-09 16:04
mveDave Kreskowiak26-May-09 16:04 
Questioncode for logout button in c# Pin
manjusha s26-May-09 2:27
manjusha s26-May-09 2:27 
AnswerRe: code for logout button in c# [REPOST!!! Please ignore.] Pin
Henry Minute26-May-09 2:50
Henry Minute26-May-09 2:50 
AnswerStop. Desist. Leave now. Pin
Pete O'Hanlon26-May-09 3:08
mvePete O'Hanlon26-May-09 3:08 
Questiondoes .net Framework(2.0 and 3.5) Supports Robotics language VPL Pin
dewana26726-May-09 0:58
dewana26726-May-09 0:58 
AnswerRe: does .net Framework(2.0 and 3.5) Supports Robotics language VPL Pin
Dave Kreskowiak26-May-09 4:16
mveDave Kreskowiak26-May-09 4:16 
QuestionLogout code in C# Pin
manjusha s26-May-09 0:39
manjusha s26-May-09 0:39 
AnswerRe: Logout code in C# Pin
annathor27-May-09 0:57
annathor27-May-09 0:57 
QuestionLogout code in C# Pin
manjusha s26-May-09 0:23
manjusha s26-May-09 0:23 

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.