views:

33

answers:

1

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
Yes, BeginInvoke is the wrong Invoke.
Henk Holterman
After Using Form.Invoke also it is crashing
subbu
well its hard to help you if you just say its crashing, you gotta be more specific.
Petoj
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
What type of crash? What did C# write in stack trace?
zabulus
It works perfectly in Debug mode. where as when I directly launch the exe it is crashing
subbu