[email protected] wrote:
* harbour/contrib/hbwin/hbwinole.h * harbour/contrib/hbwin/olecore.c + added hb_oleItemGetCallBack() and hb_oleItemSetCallBack() functions and support for user defined items bound with OLE GC pointer item* harbour/contrib/hbwin/axcore.c * bound callback function with OLE item so it will be automatically released with OLE object * harbour/contrib/hbwin/tests/testax.prg ! destroy window * enabled destructor So far MS-Windows users haven't defined expected behavior for OLE code so I took my own arbitrary decision and bound callback with OLE GC item. When last copy of this item is cleared then callback is unregistered and freed. It means that it can happen before AX window is closed. If you prefer different behavior then please clearly define what you need and I can try to change existing code. Now testax.prg should cleanly execute without any GPF traps and resource leaks.
I guess you mean me :). I have only got online now, so I had not seen your other post. What you have done looks perfectly logical. I guess there may be other ways of instantiating ActiveX objects without using ATL, and perhaps the window handle would not be available. So it's not the job of this code to destroy windows etc.
Thank you very much and I will test soon. Regards Alex _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
