khi gia

Jul 29, 2008 6:37pm

VB callback from C++ library

Spent few hours learning to call C++ from VB and VB from C++. It’s relatively easy (type convertion is ok, just be carefull that calling conventions is not the same in IDE (require std call conventions) and executable (both C and std are ok)).

Biggest problem is that a thread not managed by VB cannot call a VB callback (it’s here:http://support.microsoft.com/kb/q198607), so I will probably need to capture a VB thread (a windows timer thread also works) in my C++ API (through a blocking call) and share data between thread with a protected queue … all that to have a callback kind of thing from a C thread to the VB world!

Update: passing Variant from VB to C++ is not fun :(

Page 1 of 1