Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

VB Callback in C++ OCX thread

DynamoCLDynamoCL Member Posts: 61
Hi all,

I have an ocx I wrote in C++ (VS6). I have created a VB program to act as the front end. I pass a callback function to the C++ ocx file and this works OK, provided the callback occurs in the main thread.

The OCX though, has a single worker thread, and the callback was going to be used to inform the VB program, the operation had completed (at the moment, I use a timer object in VB to keep asking the ocx if it has finished, and checks every 2 seconds).

My question then, is it possible to use a callback in a seperate thread, or do I need to think of something else? At the moment, as soon as I call the callback function, the application crashes.

Sign In or Register to comment.