C++ and VB

Started by
10 comments, last by Last Attacker 20 years, 8 months ago
quote:Original post by Last Attacker
If it is possible to do it like the way I hoped it would be, please don''t hesitate to reply.

It is, but I''m not completely sure how. First, you should have a solution that contains both your C++ project and your VB project.

.Net is object driven. The only C++ code that you will be able to call from VB will be the one found in your __gc classes. If you don''t know what __gc classes are, read about Managed Extensions for C++.

Even though you can''t call a regular C++ function from VB, your __gc classes have the power to do that, so they serve as intermediaries between non-CLR C++ and .Net. Your non-CLR C++ can also be unmanaged, to get better performance.

I think that if your C++ code is compiled to MSIL, you will automatically have an assembly in your project structure. (I may be talking through my hat here, but) This contains the signature of your classes and functions. I think that you don''t have to use it directly, but if you see it in your project, it''s a good sign.

Finally, VB.Net project needs to have a reference to your C++ project. Check the "References" part of your VB project tree, and add it there.

Cédric
Advertisement
Thanks Cedric!
So what you''re basicly telling me is to check out these _gc classes and to add a Managed C++ project with VB.

BTW. crazyjul, I don''t know Java yet, I''ll start with that next year and will try to keep that in mind.

Cheers!

// Last Attacker \\---=( LA )=---// LA Extreme \\

ICQ Number : 120585863

E-mail:

laextr@icqmail.com
"Take delight in the Lord and He will give you your heart's desires" - Psalm 37:4My Blog

This topic is closed to new replies.

Advertisement