Using C++/CLI class from VB

  • Thread starter Thread starter maz
  • Start date Start date
M

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
 
maz said:
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
 
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.
 
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.
 
"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.






- 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
 
Back
Top