473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Using C++/CLI class from VB

maz
Hi,

I need to access methods from a C++/CLI class in VB.NET .

How can I do that?

Is should be something along the lines of "registering" the C++
program with the .NET framework and then probably adding a reference
to it from my VB code... But I'm not sure how I can do it and I don't
have much time to snoop around myself

Thanks

Aug 16 '07 #1
4 3035
maz wrote:
Hi,

I need to access methods from a C++/CLI class in VB.NET .

How can I do that?

Is should be something along the lines of "registering" the C++
program with the .NET framework and then probably adding a reference
to it from my VB code... But I'm not sure how I can do it and I don't
have much time to snoop around myself
There's no registering. Just add a reference to your VB.NET project that
references the C++/CLI assembly(ies) you've made and you'll be able to
access your C++/CLI classes. If you put the VB.NET and C++/CLI projects in
the same solution, adding the reference is even easier, and VS will know
about the build dependency between the projects.

Note that only "CLS Compliant" classes are guaranteed to be accessible from
other languages (that's what CLS compliance is all about, afterall).

-cd
Aug 16 '07 #2
maz
On Aug 16, 5:02 pm, "Carl Daniel [VC++ MVP]"
<cpdaniel_remove_this_and_nos...@mvps.org.nospamwr ote:
maz wrote:
Hi,
I need to access methods from a C++/CLI class in VB.NET .
How can I do that?
Is should be something along the lines of "registering" the C++
program with the .NET framework and then probably adding a reference
to it from my VB code... But I'm not sure how I can do it and I don't
have much time to snoop around myself

There's no registering. Just add a reference to your VB.NET project that
references the C++/CLI assembly(ies) you've made and you'll be able to
access your C++/CLI classes. If you put the VB.NET and C++/CLI projects in
the same solution, adding the reference is even easier, and VS will know
about the build dependency between the projects.

Note that only "CLS Compliant" classes are guaranteed to be accessible from
other languages (that's what CLS compliance is all about, afterall).

-cd
Thanks Carl...

I'm quite new at this whole .Net issue... The assembly u mentioned.
That should have been generated when i built my C++/CLI verifiable
class(i've explicitly set the project to be verifiable). Where would
it usually reside?

Also, I've read some stuff quickly about "manifests"... which I guess
should be a way for these assemblies to "manifest" themselves to
the .net framework. then again i may be wrong. I'd really like to read
some helpful article/tutorial/u-name-it about this issue. I really
dislike working when i know very little even tho it does get the job
done most of the time.

Is there any really helpful article u can point me to? I'm talking
about some really enlightening article here: starts at the surface and
then dives deep.
Aug 16 '07 #3
Also, I've read some stuff quickly about "manifests"... which I guess
should be a way for these assemblies to "manifest" themselves to
the .net framework. then again i may be wrong. I'd really like to read
some helpful article/tutorial/u-name-it about this issue. I really
dislike working when i know very little even tho it does get the job
done most of the time.
"Manifest" here has little to do with the verb manifest, meaning reveal
oneself to, and more to do with say a ship's cargo manifest, meaning a list
of contents and specifications thereto.
>
Is there any really helpful article u can point me to? I'm talking
about some really enlightening article here: starts at the surface and
then dives deep.

Aug 16 '07 #4
maz
On Aug 16, 7:38 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospamwrote:
Also, I've read some stuff quickly about "manifests"... which I guess
should be a way for these assemblies to "manifest" themselves to
the .net framework. then again i may be wrong. I'd really like to read
some helpful article/tutorial/u-name-it about this issue. I really
dislike working when i know very little even tho it does get the job
done most of the time.

"Manifest" here has little to do with the verb manifest, meaning reveal
oneself to, and more to do with say a ship's cargo manifest, meaning a list
of contents and specifications thereto.


Is there any really helpful article u can point me to? I'm talking
about some really enlightening article here: starts at the surface and
then dives deep.- Hide quoted text -

- Show quoted text -
Hmmm... Actually I think that both perspectives, urs and mine, are
quite descriptive of our topic here tho we approach it from two
slightly different perspectives. I happen to work for a bank so I
understand perfectly what a ships' crago manifest is ... Our trade
finance department deals with those daily.

I just wanted to give what i wanted to say a kind of literary
touch ;-)

Anyway, I hope someone can point me to some reference... what i've
received as feedback so far is not what i expected.

Thanks...

I'd really appreciate some

Aug 16 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael Sparks | last post by:
Anyway... At Europython Guido discussed with everyone the outstanding issue with decorators and there was a clear majority in favour of having them, which was good. From where I was sitting it...
5
by: Carlos Ribeiro | last post by:
Hello all, I'm posting this to the list with the intention to form a group of people interested in this type of solution. I'm not going to spam the list with it, unless for occasional and...
10
by: Christopher Benson-Manica | last post by:
Why can't I use a class destructor in a using declaration: using MyClass::~MyClass; ? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org ...
8
by: Douglas | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** Hello, The following code does not compile if line 3 is uncommented "using namespace std". I do not understand it. Could...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
3
by: flat_ross | last post by:
For anyone who is just getting into VB.NET and/or is starting to work with inheritance I would like to point out a potential pitfall. We found this confusion recently when code-reviewing an...
8
by: acb | last post by:
Hi, I wrote a DLL Component (using Visual Studio 2005) and managed to include it into a C# Console application. I am now trying to include this component into a Web project. I copy the DLL...
1
by: Peter Nofelt | last post by:
Hey All, I am having issue with serializing a class and its base class using ..net 2.0. I am using IXmlSerializable I've provided code displaying my at the bottom of this post. Thanks ahead...
6
by: ivan.leben | last post by:
I want to write a Mesh class using half-edges. This class uses three other classes: Vertex, HalfEdge and Face. These classes should be linked properly in the process of building up the mesh by...
8
by: =?Utf-8?B?Q2hyaXMgSGFsY3Jvdw==?= | last post by:
Hi there I've successfully added some .NET validation controls to a page (using <asp:RequiredFieldValidator ...), however when I try to set the 'display' property to 'dynamic', my page then...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.