>Okay I have learned enough and been through enough pain & suffering in C++ to create a working active-x.
>
>I had big problems figuring out that a callback function was attemping to fire an event (custom or stock) in another thread, but I eventually figured out how to pass a pointer to that function into the C Library that is responsible for calling my callback function which fires a single event and sets some properties of the active-x itself.
>
>However VFP does not recognize the event firing even though the activex test container and vb see it just fine...
>
>Can VFP handle an event fired across multiple threads ?
>
>Thanks
>
>Greg Foote
>VFP 8
You should NEVER fire an event across threads through a direct pointer. You must post the message to a queue window on the main control thread and have that make the fireevent call.
i.e.
-create window on main thread.
-spawn worker thread
-in worker thread sendmessage to window made on main thread
-in window on main thread, fire the event.
You will get data corruption and bunch of other issues by not doing it this way.
Brian Seekford
Seekford Solutions, Inc.http://www.SeekfordSolutions.comInternet ActiveX Controls and .NET Class Libraries.
SMTP/S FTP POP3/S HTTP/S SNTP MIME PING WHOIS TRACEROUTE NNTP DNS MX
Base64, UUEncode, yEnc, MD5, SHA1, URL, Quoted-Printable.
Resizer and Tooltips
Email Verification and more. Check us out!