I have set of c++ dlls and a c# exe . My c++ dlls are multi-threaded and they put data into a Database. My c# exe uses Background worker . My c# exe gets these data to a Data table asynchronously. To achieve this I am using named Mutex. My problem is when I assign this Data Table to my grid view It is crashing. I am using delegates and Begin Invoke .
+1
A:
With begin invoke do you mean myDelegate.BeginInvoke? you could try myForm.Invoke this runs the delegate on the UI Thread...
Petoj
2010-02-26 09:19:02
Yes, BeginInvoke is the wrong Invoke.
Henk Holterman
2010-02-26 09:32:34
After Using Form.Invoke also it is crashing
subbu
2010-02-26 09:50:26
well its hard to help you if you just say its crashing, you gotta be more specific.
Petoj
2010-02-26 09:53:24
After Invoke I release a mutex so that my c++ dlls can again use the database. My Grid is also getting updated but it crashes the moments it is updated.
subbu
2010-02-26 10:57:53
What type of crash? What did C# write in stack trace?
zabulus
2010-02-26 11:19:23
It works perfectly in Debug mode. where as when I directly launch the exe it is crashing
subbu
2010-02-26 12:27:19