Quote Originally Posted by jmsrickland View Post
Looks like that sort of kills your theory about all that COM and TypeLib stuff.
Maybe. Maybe not. It's a well known issue though and I've seen it myself with API callbacks that run on their own threads time after time.

This isn't just about RtlMoveMemory() calls, it is every API call used during the callback that you defined using Declare statements that will fail. All of them must be defined through typelibs. And you can't do anything else during that time such as touch any COM object's methods, properties, or events (including any of your program's Forms).

You seem to be making 3 different API calls plus whatever "GotData" is. None of these can be called through a Declare or through COM.


But if you've covered those bases and it still fails then it must be something else.