Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / August 2007

Tip: Looking for answers? Try searching our database.

Using C++/CLI class from VB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
maz - 16 Aug 2007 10:14 GMT
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
Carl Daniel [VC++ MVP] - 16 Aug 2007 15:02 GMT
> Hi,
>
[quoted text clipped - 6 lines]
> 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
maz - 16 Aug 2007 16:19 GMT
On Aug 16, 5:02 pm, "Carl Daniel [VC++ MVP]"
<cpdaniel_remove_this_and_nos...@mvps.org.nospam> wrote:
> > Hi,
>
[quoted text clipped - 17 lines]
>
> -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.
Ben Voigt [C++ MVP] - 16 Aug 2007 17:38 GMT
> 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.
maz - 16 Aug 2007 20:53 GMT
> > Also, I've read some stuff quickly about "manifests"... which I guess
> > should be a way for these assemblies to "manifest" themselves to
[quoted text clipped - 12 lines]
>
> - 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.