Hello all,

Ultimately I'm writing a VB interface to a message broker written in java. The message broker has a C API that I'm using to interface to. My problem is that I've written a callback function in VB (it's in a standard module) and passed the address to the C API. Everything works great. I even get the callback telling me I have a message. However, for some reason, the VB development environment keeps crashing everytime the callback function is called. I've place Debug.Print statements in the callback and they all execute so I know the callback does its thing and leaves.

The error I get is "The instruction at "blah" referenced memory at "blah". The memory could not be "read".

The strange things is that the instruction address and the memory location address are the same.

I activate the callback from a form that pushes data to the message broker who in turn sends it back to me.

Any ideas on why the VB environment keeps crashing?

Thanks,

Kenny