AnsweredAssumed Answered

vrf ActiveX events interrupting VEE???

Question asked by VRFuser on Feb 9, 2006
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><META content="MSHTML 6.00.2800.1528" name=GENERATOR><STYLE></STYLE></HEAD><BODY bgColor=#ffffff><DIV><FONT face=Arial size=2>Hello all</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>I have a question that may be only the VEE people would know (or Shawn   ).</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>We use an ActiveX UEI Framework library.  This fires events when acquired data is available or an error occurs.</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>We have created a wrapper ActiveX DLL for this UEI library and it sits as a layer between the UEI DLL and the host VEE program.  VEE polls the wrapper library to get a "DataAvailable" status and to get data from the wrapper DLL.</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>The strange thing is that events fired by the UEI Framework are handled by our wrapper DLL even when the host VEE program is stopped (development mode).  I also noticed that the thread ID (API GetCurrentThreadID) is the same in the event handler and the host VEE program.  I guess this means that VEE is 'interrupted (even when program is stopped) to service the event.  Is this right?</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>We are seeing some strange errors and we're not sure why.  I think that during a VEE call to a wrapper "GetStatus" / "GetData" function, the wrapper function is interrupted by an event fired by the UEI Framework, and then there are 2 Wrapper DLL functions running at the same time accessing the same data and causing errors (complete program lock-ups).  </FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>Visual Basic is supposed to be 'thread safe' and should prevent 2 functions running at the same time, but VEE may be changing this.</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>Can anyone shed any light on this scenario?  Would the wrapper DLL still be 'thread safe' when used with VEE?</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>We're using VEE6.03, Visual Basic 6 (SP5), WinXP (SP2)</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>Thanks for any help.</FONT></DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2></FONT> </DIV><DIV><FONT face=Arial size=2>Andrew Fudge</FONT></DIV><DIV><FONT face=Arial size=2>Genesys Test Engineering</FONT></DIV><DIV><FONT face=Arial size=2>Wales, UK</FONT></DIV><BR>---<BR>You are currently subscribed to vrf as: rsb@soco.agilent.com<BR>To subscribe send an email request to "owner-vrf@it.lists.it.agilent.com".<BR>To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".<BR>To send messages to this mailing list,  email "vrf@agilent.com".  <BR>If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".<BR>Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".</BODY></HTML>  

Outcomes