I have created a .Net com object and need to test it by instantiating it in VB6 and stepping into it from VB6.
I'm a bit stumped though. Do I do the same as normal vb ?
I can't run the .net class libraryproject by itself.
Printable View
I have created a .Net com object and need to test it by instantiating it in VB6 and stepping into it from VB6.
I'm a bit stumped though. Do I do the same as normal vb ?
I can't run the .net class libraryproject by itself.
You mean whether you need a .NET Framework or not ? if this is your question , then yes , it's a must for your class to work with VB6. Or if you're asking about instantiating your class in VB6 , I believe it works the same as VB.NET . You have to instantiate it , if my memory still help .
Yeah the latter mate. I basically have 2 projects running - a vb6 proj trying to instantiate and step into a .net class project. trouble is I can't run the .net class proj by itself. I have to create a .net test windows app in the same solution and instantiate the class proj. Then run vb6 referencing the .net class obj and try to step into it.
Does that sound correct ?
I don't understand the setup of your projects .Are you trying to use methods inside a dll file or to interact with the .NET app or what?
the set up:
1 vb6 project running.
1 .net class library project running.
The vb6 project calls a function (after instantiating the class) inside the .net project.
same as having 2 out of process vb6 projects running and stepping from one to the other (except one is .net)
the .net class proj is created as a com object as well. referenced by the vb6 proj.
obvoiusly I cannot run the .net class library proj by itself, so i add a .net windows app to the .net solution and when run it also instantiates the .net class library class1.
let me know if you need further info.
I might be missing your point but what's your ultimate goal ? Is it debugging your methods in the .NET class Lib ? or Calling a function in the .NET proj from a VB6 proj ?
Let me see if can translate for you Pirate, I understand what he's asking for (I think).
He's got two projects 1 VB6 and one .NET.
The VB6 project calls a method in the .NET class (presumably some kind of DLL).
He wants to know if it's possible while running the VB6 app (using the F8 key, stepping line by line) that when it comes to calling the .NET class, will it cary over and he can then step through the .NET code (I'm assuming both IDE's are up and running). I think the problem is that unlike in VB6 where you cna jsut fire up the dll and wait untill it gets called, the VS.NET IDE wants to run the .NET class in a app test bed, which would be outside the threading from the VB6 app.
I think what you are going to need to do is use some asserts and messageboxes to write out data as it goes through, then inspect the file after the fact. But this is all jsut guess work.
TG
I think MS forgot to bear this in mind . If the translator(techgnome) :D was right about his explanation , I don't think this is possible .
If you're having difficutlies while transferring values from/to the .NET methods (which I believe it's not a problem since both versions are VB) then use Attributes and Marshelling .
Thanks to both of you for your replies. I kind of thought I may have to go down the messagebox route.