Hi Rick, How about finding some other product (maybe the WMI asynchronous examples) where you are expected to write a COM interface and an event handler, and see how that works for you using vb.net? You could use Word or Excel; their object models provide for events. This would give you some feel for how your vb.net is interfacing with other object models. Just a thought. Chip
_____ From: RicksPlace [mailto:ofbgm...@mi.rr.com] Sent: Tuesday, June 19, 2012 11:32 AM To: gw-scripting@gwmicro.com Subject: Re: OnKeyDown And OnKeyUp Returned DataType Question Hi Again: I used an Object.TypeCode statement to get the WindowEyes.KeyDisposition.kdProcess data type and it was int32 which is Integer in vb.net. So, I changed the function data type returned from WindowEyes.KeyDisposition type to Integer but this appears to have no effect on the problem. So this test seems a dead end. I am waiting to hear if WE uses the value returned from a script's OnKeyDown function handler directly as int32 or what it may be converted to internally by the WindowEyes code. But, at least now I have a clue that my script is returning a int32 value of 2 from it's OnKeyDown and OnKeyUp Event Handler Functions for the kdProcess Enum. If WindowEyes is expecting an int32 value then the problem is likely outside my script and outside WindowEyes processing of the returned code but still could be in some WE message processing code or other MS Marshalling code or just COM gremlins sucking the life out of me. Rick USA ----- Original Message ----- From: RicksPlace <mailto:ofbgm...@mi.rr.com> To: gw-scripting@gwmicro.com Sent: Tuesday, June 19, 2012 8:25 AM Subject: OnKeyDown And OnKeyUp Returned DataType Question Hi Guys: In my ongoing OnKeyDown and OnKeyUp saga I am trying to analyze what might be going on. What is the actual Data Type as used in the WE COM DLL or Engine or whatever of the WindowEyes.KeyDisposition enum variable? Are the actual values expected to be returned to WindowEyes used as integers (short, long, byte or whatever) or some type of terminated or not-terminated string and, if so, what type? In my code I have: Dim AppropriateDisposition As WindowEyes.KeyDisposition AppropriateDisposition = WindowEyes.KeyDisposition.kdProcess Return AppropriateDisposition This code will apparently allow KeyUp and KeyDown events to be logged properly to the WEEvent Viewer but the MSAA and other Events which are suppose to be triggered by these Keys upon a key press are not being logged to the WEEvent viewer nor spoken by WindowEyes as they should be from my understanding. It sounds like perhaps WindowEyes is getting the Key Press messages and trying to process them except that it might not know what to do with the message after getting it back from my script - just a wild guess from a novice but all I have at this point. One thing that might cause this could be that the vb.net IML or internal marshalling operations are not passing the correct data type to WindowEyes upon returnning from a OnKeyDown and, or, OnKeyUp Event handler function if necessary. So, if I know exactly what system 32, or whatever, data type is expected and how it is used I might be able to pick a corresponding data type and use MarshalAs Attribute to try and return it. Thanks: Rick USA