How can i debug a VC COmponent(exe) in a VB Application?
I'm calling the interface method of the component in VB Application. The values are not passed properly. SO i would like to debug. Can anyone suggest me how?
Thanx in advance!
Printable View
How can i debug a VC COmponent(exe) in a VB Application?
I'm calling the interface method of the component in VB Application. The values are not passed properly. SO i would like to debug. Can anyone suggest me how?
Thanx in advance!
I don't think you debug a component like that. If you don't have the source code then there are no chances of getting past the function call.Quote:
Originally Posted by s01
I have the code.Quote:
Originally Posted by Shuja Ali
Just to add to the solid advice of Shuja (as always).
I have a couple of questions..
Isn't there perhaps some documentation included with your VC component¿
Are you sure you are using it properly in your VB project ¿
When you say, you would like to debug, does it ask you to debug¿
Do you get error messages of some sorts¿
It does not give any error message. But the return value is empty. So i would like to debug and see whether the passed value is taken properly.
Do you have the source code of VS Component?Quote:
Originally Posted by s01
And as Hannes has suggested, go through the documentation provided by the Component vendor.
when this is a component written by yourself then you can do remote debugging in VC and using a VB demoproject where you use the component. then you can go step by step ( if you need ) through the component watching all values you need and the results. E.g. once I did a special activeX for a sort of combobox in VC and then debugging it with a VB form where only this and some textboxes and a button was there. With that I could debug all I wanted.Quote:
Originally Posted by Shuja Ali
For every thing, I wanted to check, I changed the VB code to my needs and then checked what the active X was doing . so I tested Adding Values to list, changing colors, Getting, losing cursor checking if events of the active X message handlers are firing to right time ... Dont check it in the original pgm where you need it it will have to much problems. Test it with quick written VB apps and when finished and all works fine then it should do its job also in the real app where you need the code.
Add hint: when you have troubles with the interface have a look onto .idl or .odl files of your C++ application. Such files can be debugged generally only in a C enviroment using Vb as a test- surface.
( Dont know how to express this better in English ) If the code is not written by you and you dont have much experience in VC++ COM and /or DCOM techniques, I wouls say :cry: forget it.
Yes, its a component written by me. I would like to know how to debug remotely. Are there any steps for doing that?Quote:
Originally Posted by JonnyPoet
I think you cannot debug your cmponent if it is in the binary format.If you are having the source then you can.But with binary you cannot.
I do havethe source for the component. Can i put breakpoints in VB as well as in VC Code and debug?Quote:
Originally Posted by trends
No. You can't do that. There is no Interoperability between VC and VB at the code level.Quote:
Originally Posted by s01
Can i change the debug file to the VB exe in the VC Component and debug?
Well I have never tried it myself.Quote:
Originally Posted by s01
Why don't you create a dummy project in VC itself and add the source file of your component to that project and then debug it. That would be better.
Yes you can. Do you have two PC's ? You will need them.Quote:
Originally Posted by s01
If you have VS 7.0 e.g VS2003.net as I have then write it and I'll give you a full explanation.
Then I can give you the exact steps. Because often done. If you have VC 6.0 then you'll find a good reference in Codeproject Here is the link
http://www.codeproject.com/debug/remotedebug.asp
Its a bit of work for the first time but then its easy to do for each project.
Jonny Poet
I have tested ActiveX components written for VB in the VC enviroment and they worked , then I tested in the testconsole which is a total other enviroment for the activeX and got other problems handled by that. Most startup troubles of my ActiveX I'm testing there. If you need them in VB you need VB at least as a container for the ActiveX because all functionallity which is using functionallity regarding Ambient Properties like enviroment colors, transparency ... needed to be checked that way.Quote:
Originally Posted by Shuja Ali
Any you can be sure, at least if you will use it in a website ( no discussion please if this is useful or secure ) then this container will give you a totally other behaviour , e.g. choosing Fonts which maybe worked best in VC++ enviroment , VC-testing container and VB, suddenly doesn't work if you do your activeX on a webpage and dont have the correct interface implemeted for that. :sick: Uuuups. I have had all that things during learning creating activeX in VC++. But this can be done and for a C++ programmer it should not be to difficult to do the setup.
If needed as told in another post I'll help if you have VC++ 7.0 which is shipped with VS 2003 .net
Jonny Poet