473,738 Members | 6,332 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5085
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.microso ft.com" <an******@gnost ice.com> wrote in message
news:OJ******** ******@TK2MSFTN GP12.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.microso ft.com" <an******@gnost ice.com> wrote in message
news:OJ******** ******@TK2MSFTN GP12.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:##******** ******@TK2MSFTN GP09.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.microso ft.com" <an******@gnost ice.com> wrote in message
news:OJ******** ******@TK2MSFTN GP12.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*******@yaho o.co.in> wrote in message
news:%2******** ********@TK2MSF TNGP10.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*********@RE CLAMEpayvision. com> wrote in message
news:#o******** ******@tk2msftn gp13.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.microso ft.com" <an******@gnost ice.com> wrote in message
news:OJ******** ******@TK2MSFTN GP12.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.microso ft.com" <an******@gnost ice.com> wrote in message
news:ea******** ******@TK2MSFTN GP12.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*********@RE CLAMEpayvision. com> wrote in message
news:#o******** ******@tk2msftn gp13.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.microso ft.com" <an******@gnost ice.com> wrote in message
news:OJ******** ******@TK2MSFTN GP12.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.NE T, VC#.NET, etc). For
VC++.NET the "Add Reference" choice which is usually found under the
"Projects" Menu is not available.

--
Sam.

"Michiel" <mi*********@RE CLAMEpayvision. com> wrote in message
news:Or******** ******@TK2MSFTN GP10.phx.gbl...
Did you switch to the .Net tab inside the Add Reference dialog ?
Btw, I'm using VS 2003.
"msnews.microso ft.com" <an******@gnost ice.com> wrote in message
news:ea******** ******@TK2MSFTN GP12.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*********@RE CLAMEpayvision. com> wrote in message
news:#o******** ******@tk2msftn gp13.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.microso ft.com" <an******@gnost ice.com> wrote in message
news:OJ******** ******@TK2MSFTN GP12.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.microso ft.com" <an******@gnost ice.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.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.NE T, VC#.NET, etc). For
VC++.NET the "Add Reference" choice which is usually found under the
"Projects" Menu is not available.

--
Sam.

"Michiel" <mi*********@RE CLAMEpayvision. com> wrote in message
news:Or******** ******@TK2MSFTN GP10.phx.gbl...
Did you switch to the .Net tab inside the Add Reference dialog ?
Btw, I'm using VS 2003.
"msnews.microso ft.com" <an******@gnost ice.com> wrote in message
news:ea******** ******@TK2MSFTN GP12.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*********@RE CLAMEpayvision. com> wrote in message
news:#o******** ******@tk2msftn gp13.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.microso ft.com" <an******@gnost ice.com> wrote in message
> news:OJ******** ******@TK2MSFTN GP12.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

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

Similar topics

3
1612
by: Brad Quinn | last post by:
Is there a way to add an assembly to the .NET tab of the "Add Reference" dialog?
5
2199
by: Trevor Andrew | last post by:
Hi There I am having some difficulty referencing Web Services. I am using Visual Studio .NET 2003, with the .NET Framework 1.1, and trying to write a VB.NET Windows Application that consumes an external Web Service When I endeavour to use the "Add Web Reference" and select a URL which I know returns a WSDL file, I get prompted with the "Open, Save, Cancel or More Info" dialog box that I am familiar with in IE. If I select Open, it opens it...
3
1734
by: Samuel R. Neff | last post by:
I just started having a problem with the Add Reference dialog not displaying in VS.NET 2003. Whenever I click Add Reference the dialog doesn't display. I've tried several different projects and solutions and rebooted the computer. No error message, just no dialog. Add Web Reference brings up a dialog, just Add Reference doesn't. If I add references manually by editing the project file in notepad
0
1558
by: Vuillermet Jacques | last post by:
Hi ! In a project, in References, when I click on "Add... / Web reference...", the following message occurs : "Some of the files required for Web references are not installed." I've uninstalled and re-installed VS2005 : no changes. Visual Studio 8.0.50727.26
1
2176
by: SrDhUS | last post by:
I get the following error when I try to add a web reference using Web Reference Dialog (VS .Net 2003) Error "The proxy settings on this computer are not configured correctly for web discovery." MSDN says: "The proxy settings on this computer are not configured correctly for Web discovery.
5
2956
by: Matthew.DelVecchio | last post by:
hello, i am working w/ a partner company's webservice, which they wrote in java. using a provided webservice.wsdl file, i am able to compile it into a proxy class, webservice.dll. i can add this assembly reference to my test ASP.NET C# test project and use it no problem. problem -- our production ASP.NET project uses strongly-named
5
10336
by: Mike Logan | last post by:
I used WSDL.exe to generate a client side web proxy for a web service, called the web service, got the results but an array returned by the web service is not in the results. However if I use "Add Web Reference" for the same service the same function works appropriately. Here is the client proxy generated from WSDL.exe <System.Web.Services.Protocols.SoapDocumentMethodAttribute("capeconnect:AppSec:AppSecPortType#getApplicationUsers",
1
2084
by: PJSimon | last post by:
In regards to this MSDN article: http://support.microsoft.com/default.aspx?scid=kb;en-us;306149 .... how do I add the registry key? I got confused on three points: 1) I do not have a key named ".NETFramework" under the "Microsoft" key. Should I just create it? 2) I don't know what to add to the "MyAssemblies" folder.
1
5122
by: abtandon | last post by:
Hi, I am using VS 2008 Team Suite for my ATL application, at one point I needed to "Add web reference", but I found it disbaled. I used the same application in VS 2005, but that was not the case in VS 2005. When I am creating web application (ASP.NET), Add web reference is enabled in the context menu, when you right click on the project. Please tell me what needs to be done to enable this option? Thanks in advance. Regards,
0
8968
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9259
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6750
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.