Problem trying to make my DLL callback a VBA function with paramet
Its me again. I do not know if anybody had a chance to look at my problem,
but I finally found the source of my problem. In fact there are two dinstinct
problem.
First, the reason why I couldn't pass parameters through a callback between
my DLL and VBA is only because I forgot to add the "ByVal" keyword in front
of the variables in the VBA callback function. This solved the main problem.
The other problem I faced with my real application, crashing as soon as a
callback is made, is related to the fact that the callback originates from a
parallel thread (not the main VBA thread). It seems that a parallel thread
cannot call properly a function in VBA which runs under the hosts main thread.
If someone has an idea on how to solve this problem, I will appreciate any
help.
Right now, the way I am planning to solve the problem is by calling from VBA
a function in my DLL which will perform any pending callbacks... This should
work OK! However, there could be delays between the time a callback is posted
and the time it is processed.
Regards,
Michel
|