>I have this C++ code I'm trying to port to VB .Net:
> HANDLE g_hImageReady = NULL; // Event for when image is ready to transfer
[quoted text clipped - 17 lines]
> exactly what they are used for and what their equivelent would be. I have
> done delegates in VB .Net. Is this related?
see
System.Threading.ManualResetEvent
and
System.Threading.AutoResetEvent
David
M K - 22 Dec 2004 19:51 GMT
I'm thinking you're on to something. Okay, here is more of my issue. (I have
a post on channel9. http://channel9.msdn.com/ShowPost.aspx?PostID=33171)
I have a form with an instance of a class (DCSIntf). DCSIntf wraps unmanaged
code. The unmanaged code calls a function in DCSIntf on certain events. My
function in DCSIntf raises an event that is handled by my form. The function
in DCSIntf fires, but only once. The subsequent calls don't fire until my
form closes. By then the wrapper class is GC'd so the unmanaged calls error.
M K - 22 Dec 2004 20:31 GMT
So, do I do:
Private g_hImageReady as ManualResetEvent
g_hImageReady = new ManualResetEvent(False)
?
Please, I'm down to the wire... this is the last piece.
M K - 22 Dec 2004 23:41 GMT
I'm not sure what to do with what you said. It seems like it would help, but
this is a new concept. Any help would be greatly appreciated, as the deadline
for this project is tomorrow.