|
|
|
start date: Thu, 16 Aug 2007 02:14:02 -0700,
posted on: microsoft.public.dotnet.languages.vc
back
| Thread Index |
|
1
maz
|
|
2
Carl Daniel [VC++ MVP] am
|
|
3
Ben Voigt [C++ MVP] am
|
|
4
maz
|
|
5
maz
|
Using C++/CLI class from VB
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
Date:Thu, 16 Aug 2007 02:14:02 -0700
Author:
|
Re: Using C++/CLI class from VB
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
Date:Thu, 16 Aug 2007 07:02:00 -0700
Author:
|
Re: Using C++/CLI class from VB
On Aug 16, 5:02 pm, "Carl Daniel [VC++ MVP]"
<cpdaniel_remove_this_and_nos...@mvps.org.nospam> wrote:
> 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.
Date:Thu, 16 Aug 2007 08:19:48 -0700
Author:
|
Re: Using C++/CLI class from VB
> 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.
Date:Thu, 16 Aug 2007 11:38:36 -0500
Author:
|
Re: Using C++/CLI class from VB
On Aug 16, 7:38 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospam> wrote:
> > 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
Date:Thu, 16 Aug 2007 12:53:13 -0700
Author:
|
|
|