for people with experience with ActiveX Controls..
-
hi there.. firstly thanks for your time.. secondly i wanted to know 3 things: 1. my container also crashes when i remove my control from the test container...cant figure out the reason...possibly something to do with the releasing of this pointer.. 2. what is the normal procedure in which u can exit a control, i mean all the releases and exitinstances and destructors? 3. from where can i get a sample OLE control so that i can use it for studying purposes.. thanks and kindest regards safee
-
hi there.. firstly thanks for your time.. secondly i wanted to know 3 things: 1. my container also crashes when i remove my control from the test container...cant figure out the reason...possibly something to do with the releasing of this pointer.. 2. what is the normal procedure in which u can exit a control, i mean all the releases and exitinstances and destructors? 3. from where can i get a sample OLE control so that i can use it for studying purposes.. thanks and kindest regards safee
The simplest way to solve the issue is to start a debug session for your ActiveX component by first of all pointing the executable to "ActiveX test container" in your Project settings \ Debug Tab. If you put a breakpoint in a destructor somehow, the session will halt there and hopefully it will be possible to isolate the issue.
-
The simplest way to solve the issue is to start a debug session for your ActiveX component by first of all pointing the executable to "ActiveX test container" in your Project settings \ Debug Tab. If you put a breakpoint in a destructor somehow, the session will halt there and hopefully it will be possible to isolate the issue.
yup got it.. thanks a lot :) One more thing if u may have time..how can i check for memory leaks in my application?? ne ideaz! thanks kindest regards safee
-
yup got it.. thanks a lot :) One more thing if u may have time..how can i check for memory leaks in my application?? ne ideaz! thanks kindest regards safee
safeeullah wrote: One more thing if u may have time..how can i check for memory leaks in my application?? When the debug session ends, it shows all leaks in the console window. If you are using MFC, you'll have plenty of details and will be able to double-click on the messages to reach the actual code being guilty. If you are not using MFC, you can instrumentalize your code by either of those : - lookup this article[^] on CodeProject - buy a commercial product like BoundsChecker (from Numega).
-
safeeullah wrote: One more thing if u may have time..how can i check for memory leaks in my application?? When the debug session ends, it shows all leaks in the console window. If you are using MFC, you'll have plenty of details and will be able to double-click on the messages to reach the actual code being guilty. If you are not using MFC, you can instrumentalize your code by either of those : - lookup this article[^] on CodeProject - buy a commercial product like BoundsChecker (from Numega).
thanks stephane.. one last thing :) i solved the crashing issue as well as the leak checking.. then i build my control in release mode.. when i built it in release mode, my spreadsheet stopped taking in data entries to cells.. ne information on this? thanks again ;)
-
thanks stephane.. one last thing :) i solved the crashing issue as well as the leak checking.. then i build my control in release mode.. when i built it in release mode, my spreadsheet stopped taking in data entries to cells.. ne information on this? thanks again ;)
safeeullah wrote: when i built it in release mode, my spreadsheet stopped taking in data entries to cells.. 1) Check out you don't have significant code in a #ifdef _DEBUG ... #endif section. Because in release mode, no code would be generated. 2) If the debug mode works fine, and the release mode doesn't, it's usually because the code is weak. There is a probably a bad use of pointers somewhere. - check out the console window for all "exception errors" that might be produced by Excel (or any other ActiveX host). - build the release mode with "Debug Info". And check the ".pdb" box. Doing so, you can put a breakpoint even in release mode. - Add a DebugBreak() statement in your code. This allows to halt the code, start a session, and watch variables, etc. To have this to work properly, it's best to generate a release version with all the debug info (see above). - add a few message boxes in your code, and watch them. That's the most primitive way of solving issues, but sometimes it's enough! Good luck! And if you are to go on with debugging, crash handlers, etc. don't hesitate to buy this book[^].