473,508 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

adding a dll

18 New Member
Hi All,

I am trying to add a dll to my .net project.

I have added a reference to the dll(from .net project) through browse and although the name of the dll shows up under references none of the classes are there and i am not able to use any of the methods from it. I am not sure if i am adding the dll correctly. Could you please advise on what i am doing incorrectly and how to sucessful add this dll to my project.

Thanks in advance :) !!!
Oct 1 '07 #1
10 1279
Plater
7,872 Recognized Expert Expert
Have you added the namespace?

If the dll project is in the same solution as your current project, going to "add a reference" there is a tab for "projects"
Otherwise you would go to the .net tab and browse for it (I believe that is what you said)

If you right click on your dll in the solution explorer and chose view in object browser, what is in there? What namespace does it use? What class names?
Oct 1 '07 #2
willywonka
18 New Member
Hi there! u really seem to be answering my question, very much appreciated!

When i right click on the dll and choose view in object browser i see my dll name and if i open it under all the classes r there. Does that mean i should be able to reference them? From my little use of vb.net i have noticed that as soon as u put a period (.) the method names avaible to u usually show up but none of the methods from the dll do.
Oct 1 '07 #3
Plater
7,872 Recognized Expert Expert
Well your dll will probably have a different namespace then your current project.
if your dll is called "mydll.dll" then the namespace is probably "mydll"

So you would use something like:
Expand|Select|Wrap|Line Numbers
  1. Dim myc = new mydll.myclass()
  2.  
Oct 1 '07 #4
willywonka
18 New Member
Thanks so much Plater!!!

Now i just wanted to know how to refer to the methods in my class on the new dll object would i type:
myc.method name?
I have tried that but it doesn't seem to work
this last piece of information would really be appreciated!!!

Also i have tried declaring the namespace @ the top of my class:
using namespace;
but i get an error saying u statement cannot appear outside of class.
Oct 1 '07 #5
Plater
7,872 Recognized Expert Expert
If you are in C# it is "using" if you are in vb.net it's something else I think.

If you can create an instance of your class, that you should be able to use it normally.
Oct 1 '07 #6
Frinavale
9,735 Recognized Expert Moderator Expert
If you are in C# it is "using" if you are in vb.net it's something else I think.

If you can create an instance of your class, that you should be able to use it normally.
Imports NameOfDll

:)
Oct 1 '07 #7
willywonka
18 New Member
Thank you Frinavale :) !
Now i just need to know how to access my methods in vb.net. I have the imports dll @ the top

dim test = New Testing
test.method

but the method names are not showing up after the period, am i declaring it wrong? how would i do it? very grateful for all the help so far!
Oct 1 '07 #8
Frinavale
9,735 Recognized Expert Moderator Expert
Thank you Frinavale :) !
Now i just need to know how to access my methods in vb.net. I have the imports dll @ the top

dim test = New Testing
test.method

but the method names are not showing up after the period, am i declaring it wrong? how would i do it? very grateful for all the help so far!

Try:

Expand|Select|Wrap|Line Numbers
  1. Dim test As New NameOfDll.Testing
  2. test.method
  3.  
Oct 1 '07 #9
willywonka
18 New Member
Yippy!!!!!!!!! Thank you so much Frinny for all ur help!!! It works and now i can continue with my work and not get in trouble!!!
Oct 1 '07 #10
Frinavale
9,735 Recognized Expert Moderator Expert
Yippy!!!!!!!!! Thank you so much Frinny for all ur help!!! It works and now i can continue with my work and not get in trouble!!!

Good stuff!


Happy coding :)

-Frinny
Oct 1 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2402
by: Jamie Fryatt | last post by:
Hi everyone, here's what id like to do. I have a table with 2 fields, name and value I need to be able to add multiple records quickly, for example I need to add name value abc 1...
10
2661
by: sp0 | last post by:
Is there a reason why to make mix numbers improper when adding? It seems when subtracting and adding, adding a subtracting the whole numbers and fraction parts should be sufficient? what'ch think
1
4457
by: hzgt9b | last post by:
When adding my VB .NET solution (with two sub-projects) the folder structure in VSS gets an extra level of folders... For example, here's the structure of the solution on my C:\...
3
4856
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
1936
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
0
1863
by: Sileesh | last post by:
Hi I have html table and a Button in an Aspx page. I am adding one row with some textboxes to Html table each time i click on the Button thru Javascript. Now problem is when when i try to...
1
2018
by: seanmayhew | last post by:
I have a form page that that while editing saves the data to an xml doc before submitting to db. On each page unload it saves the xmldoc as the user can add multiple items to the company like...
6
2656
by: vb | last post by:
Hi, I am new to .Net. I am using a Combo Box in my windows forms. I am adding the items by creating the instances and adding the same to the list. My questions/doubts are: 1. If I have 25 to...
9
4467
by: Kadett | last post by:
Hi all, I have following problem: I'm creating a ListView (Details) control at run-time and filling it with some records (let's say 10 000). This operation seems to be quite fast, but when I call...
0
1404
by: AndyL69 | last post by:
Hello I've got a very strange Problem. When im adding a new ACE entry to a UNC Direcotry the inherented ACL's will be lost. When I'm adding a new ACE to a directory / file in this UNC path the...
0
7224
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,...
0
7118
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7038
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...
1
5049
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...
0
4706
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...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.