471,595 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to "Add Reference" in VC.NET?

Hi,

How do I add a reference in VC++.NET?

In VB.NET and VC#.NET, there's an option in "Project" menu called "Add
Reference". This will add a .NET DLL reference to the current project. After
I add a reference, I can start using the class in the DLL as follows:

[VB]
Imports <TheNamespace>

Dim someobj As New <ClassName>

[VC#]
using <TheNamespace>

<ClassName> obj = new <ClassName>

Please note that this a namespace can be imported or used only after adding
the reference.

How do I similar kind of operation in VC++.NET? I want to use a DLL which
cannot be dropped on the form. It can only be used through code.

Please Help.

--
Sam

Nov 17 '05 #1
10 4940
You add the reference in the solution explorer References map and then put

using namespace <TheNamespace>

To instantiate an object use <ClassName>* obj = new <ClassName>.

"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:OJ**************@TK2MSFTNGP12.phx.gbl...
Hi,

How do I add a reference in VC++.NET?

In VB.NET and VC#.NET, there's an option in "Project" menu called "Add
Reference". This will add a .NET DLL reference to the current project. After I add a reference, I can start using the class in the DLL as follows:

[VB]
Imports <TheNamespace>

Dim someobj As New <ClassName>

[VC#]
using <TheNamespace>

<ClassName> obj = new <ClassName>

Please note that this a namespace can be imported or used only after adding the reference.

How do I similar kind of operation in VC++.NET? I want to use a DLL which
cannot be dropped on the form. It can only be used through code.

Please Help.

--
Sam

Nov 17 '05 #2
> You add the reference in the solution explorer References map and then put

using namespace <TheNamespace>

To instantiate an object use <ClassName>* obj = new <ClassName>.

or you can use following instruction:
#using <filename.dll>

Regards, Robert
"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:OJ**************@TK2MSFTNGP12.phx.gbl...
Hi,

How do I add a reference in VC++.NET?

In VB.NET and VC#.NET, there's an option in "Project" menu called "Add
Reference". This will add a .NET DLL reference to the current project.

After
I add a reference, I can start using the class in the DLL as follows:

[VB]
Imports <TheNamespace>

Dim someobj As New <ClassName>

[VC#]
using <TheNamespace>

<ClassName> obj = new <ClassName>

Please note that this a namespace can be imported or used only after

adding
the reference.

How do I similar kind of operation in VC++.NET? I want to use a DLL which cannot be dropped on the form. It can only be used through code.

Please Help.

--
Sam


Nov 17 '05 #3
Hi,

Thanks to both Michiel and Robert. I'll try both.

--
Sam.

"SunFire" <sf****@interia.pl> wrote in message
news:##**************@TK2MSFTNGP09.phx.gbl...
You add the reference in the solution explorer References map and then put

using namespace <TheNamespace>

To instantiate an object use <ClassName>* obj = new <ClassName>.


or you can use following instruction:
#using <filename.dll>

Regards, Robert
"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:OJ**************@TK2MSFTNGP12.phx.gbl...
Hi,

How do I add a reference in VC++.NET?

In VB.NET and VC#.NET, there's an option in "Project" menu called "Add
Reference". This will add a .NET DLL reference to the current project.

After
I add a reference, I can start using the class in the DLL as follows:

[VB]
Imports <TheNamespace>

Dim someobj As New <ClassName>

[VC#]
using <TheNamespace>

<ClassName> obj = new <ClassName>

Please note that this a namespace can be imported or used only after

adding
the reference.

How do I similar kind of operation in VC++.NET? I want to use a DLL

which cannot be dropped on the form. It can only be used through code.

Please Help.

--
Sam




Nov 17 '05 #4
Hye Michiel,
as you told in the prevous post, "You add the reference in the solution
explorer References map and then put", but I don't understand where is
References map in Solution Explorer???

Can you please throw some light on this aspect...

Jigar Mehta
jb*******@yahoo.co.in
----------------------------------------
Nov 17 '05 #5

"Jigar Mehta" <jb*******@yahoo.co.in> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hye Michiel,
as you told in the prevous post, "You add the reference in the solution explorer References map and then put", but I don't understand where is
References map in Solution Explorer???

Can you please throw some light on this aspect...

Jigar Mehta
jb*******@yahoo.co.in
----------------------------------------

When you create a new project such a map should have been appended to the
solution explorer tree-view (ctrl-alt-L, also under Views in your menu).

HTH,

Michiel.
Nov 17 '05 #6
Hi Michiel,

I still can't figure out how to add a .NET DLL to VC++.NET project. In the
Reference Map, there's no way to add a .NET DLL Reference.

Please explain.

--
Sam.

"Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
news:#o**************@tk2msftngp13.phx.gbl...
You add the reference in the solution explorer References map and then put

using namespace <TheNamespace>

To instantiate an object use <ClassName>* obj = new <ClassName>.

"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:OJ**************@TK2MSFTNGP12.phx.gbl...
Hi,

How do I add a reference in VC++.NET?

In VB.NET and VC#.NET, there's an option in "Project" menu called "Add
Reference". This will add a .NET DLL reference to the current project.

After
I add a reference, I can start using the class in the DLL as follows:

[VB]
Imports <TheNamespace>

Dim someobj As New <ClassName>

[VC#]
using <TheNamespace>

<ClassName> obj = new <ClassName>

Please note that this a namespace can be imported or used only after

adding
the reference.

How do I similar kind of operation in VC++.NET? I want to use a DLL which cannot be dropped on the form. It can only be used through code.

Please Help.

--
Sam



Nov 17 '05 #7
Did you switch to the .Net tab inside the Add Reference dialog ?
Btw, I'm using VS 2003.
"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
Hi Michiel,

I still can't figure out how to add a .NET DLL to VC++.NET project. In the
Reference Map, there's no way to add a .NET DLL Reference.

Please explain.

--
Sam.

"Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
news:#o**************@tk2msftngp13.phx.gbl...
You add the reference in the solution explorer References map and then put

using namespace <TheNamespace>

To instantiate an object use <ClassName>* obj = new <ClassName>.

"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:OJ**************@TK2MSFTNGP12.phx.gbl...
Hi,

How do I add a reference in VC++.NET?

In VB.NET and VC#.NET, there's an option in "Project" menu called "Add
Reference". This will add a .NET DLL reference to the current project.

After
I add a reference, I can start using the class in the DLL as follows:

[VB]
Imports <TheNamespace>

Dim someobj As New <ClassName>

[VC#]
using <TheNamespace>

<ClassName> obj = new <ClassName>

Please note that this a namespace can be imported or used only after

adding
the reference.

How do I similar kind of operation in VC++.NET? I want to use a DLL

which cannot be dropped on the form. It can only be used through code.

Please Help.

--
Sam


Nov 17 '05 #8
Hi Michiel,

There is no "Add Reference" choice/option in Visual C++.NET 2002 or 2003.
It's available only for the other languages(VB.NET, VC#.NET, etc). For
VC++.NET the "Add Reference" choice which is usually found under the
"Projects" Menu is not available.

--
Sam.

"Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
Did you switch to the .Net tab inside the Add Reference dialog ?
Btw, I'm using VS 2003.
"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
Hi Michiel,

I still can't figure out how to add a .NET DLL to VC++.NET project. In the
Reference Map, there's no way to add a .NET DLL Reference.

Please explain.

--
Sam.

"Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
news:#o**************@tk2msftngp13.phx.gbl...
You add the reference in the solution explorer References map and then

put
using namespace <TheNamespace>

To instantiate an object use <ClassName>* obj = new <ClassName>.

"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:OJ**************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> How do I add a reference in VC++.NET?
>
> In VB.NET and VC#.NET, there's an option in "Project" menu called "Add > Reference". This will add a .NET DLL reference to the current project. After
> I add a reference, I can start using the class in the DLL as follows: >
> [VB]
> Imports <TheNamespace>
>
> Dim someobj As New <ClassName>
>
> [VC#]
> using <TheNamespace>
>
> <ClassName> obj = new <ClassName>
>
> Please note that this a namespace can be imported or used only after
adding
> the reference.
>
> How do I similar kind of operation in VC++.NET? I want to use a DLL

which
> cannot be dropped on the form. It can only be used through code.
>
> Please Help.
>
> --
> Sam
>



Nov 17 '05 #9
Well in my version there is :P Anyway, you _do_ have a references map in the
Solution Explorer ? You have to right-click on it.

"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi Michiel,

There is no "Add Reference" choice/option in Visual C++.NET 2002 or 2003.
It's available only for the other languages(VB.NET, VC#.NET, etc). For
VC++.NET the "Add Reference" choice which is usually found under the
"Projects" Menu is not available.

--
Sam.

"Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
Did you switch to the .Net tab inside the Add Reference dialog ?
Btw, I'm using VS 2003.
"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
Hi Michiel,

I still can't figure out how to add a .NET DLL to VC++.NET project. In the Reference Map, there's no way to add a .NET DLL Reference.

Please explain.

--
Sam.

"Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
news:#o**************@tk2msftngp13.phx.gbl...
> You add the reference in the solution explorer References map and then
put
>
> using namespace <TheNamespace>
>
> To instantiate an object use <ClassName>* obj = new <ClassName>.
>
> "msnews.microsoft.com" <an******@gnostice.com> wrote in message
> news:OJ**************@TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > How do I add a reference in VC++.NET?
> >
> > In VB.NET and VC#.NET, there's an option in "Project" menu called "Add > > Reference". This will add a .NET DLL reference to the current project. > After
> > I add a reference, I can start using the class in the DLL as follows: > >
> > [VB]
> > Imports <TheNamespace>
> >
> > Dim someobj As New <ClassName>
> >
> > [VC#]
> > using <TheNamespace>
> >
> > <ClassName> obj = new <ClassName>
> >
> > Please note that this a namespace can be imported or used only

after > adding
> > the reference.
> >
> > How do I similar kind of operation in VC++.NET? I want to use a DLL which
> > cannot be dropped on the form. It can only be used through code.
> >
> > Please Help.
> >
> > --
> > Sam
> >
>
>


Nov 17 '05 #10
OK...Got It! I was looking mostly at Visual Studio 2002. Looks like it's
available only in Visual Studio 2003. I am unable to find it in Visual
Studio 2002. Any idea how to add reference in VS2002?

Thanks,
--
Sam.
"Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
news:ug**************@tk2msftngp13.phx.gbl...
Well in my version there is :P Anyway, you _do_ have a references map in the Solution Explorer ? You have to right-click on it.

"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi Michiel,

There is no "Add Reference" choice/option in Visual C++.NET 2002 or 2003.
It's available only for the other languages(VB.NET, VC#.NET, etc). For
VC++.NET the "Add Reference" choice which is usually found under the
"Projects" Menu is not available.

--
Sam.

"Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
Did you switch to the .Net tab inside the Add Reference dialog ?
Btw, I'm using VS 2003.
"msnews.microsoft.com" <an******@gnostice.com> wrote in message
news:ea**************@TK2MSFTNGP12.phx.gbl...
> Hi Michiel,
>
> I still can't figure out how to add a .NET DLL to VC++.NET project.
In the
> Reference Map, there's no way to add a .NET DLL Reference.
>
> Please explain.
>
> --
> Sam.
>
> "Michiel" <mi*********@RECLAMEpayvision.com> wrote in message
> news:#o**************@tk2msftngp13.phx.gbl...
> > You add the reference in the solution explorer References map and then put
> >
> > using namespace <TheNamespace>
> >
> > To instantiate an object use <ClassName>* obj = new <ClassName>.
> >
> > "msnews.microsoft.com" <an******@gnostice.com> wrote in message
> > news:OJ**************@TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > >
> > > How do I add a reference in VC++.NET?
> > >
> > > In VB.NET and VC#.NET, there's an option in "Project" menu
called "Add
> > > Reference". This will add a .NET DLL reference to the current

project.
> > After
> > > I add a reference, I can start using the class in the DLL as

follows:
> > >
> > > [VB]
> > > Imports <TheNamespace>
> > >
> > > Dim someobj As New <ClassName>
> > >
> > > [VC#]
> > > using <TheNamespace>
> > >
> > > <ClassName> obj = new <ClassName>
> > >
> > > Please note that this a namespace can be imported or used only

after > > adding
> > > the reference.
> > >
> > > How do I similar kind of operation in VC++.NET? I want to use a DLL > which
> > > cannot be dropped on the form. It can only be used through code.
> > >
> > > Please Help.
> > >
> > > --
> > > Sam
> > >
> >
> >
>



Nov 17 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Brad Quinn | last post: by
5 posts views Thread by Trevor Andrew | last post: by
5 posts views Thread by Matthew.DelVecchio | last post: by
5 posts views Thread by Mike Logan | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

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.