473,666 Members | 2,281 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 1287
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

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

Similar topics

6
2404
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 abc 2 abc 3
10
2676
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
4468
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:\ ....\mySolution\mySolution.sln ....\mySolution\myProject1\myProject1.vbproj -- and -- ....\mySolution\myProject2\myProject2.vbproj But after adding the solution to VSS the structure looks like this:
3
4872
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 the best method? Do you have a sample of how to do this?
3
1944
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 example would be: Let's say Column1=StartDate and Column2=EndDate. In addition to displaying Column1 and Column2, I need to do some calculations and display in as Column3. The calculations are easy and can be done in the code-behind. How to display...
0
1871
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 collect the data in the Textboxes which i added dynamically from server side, i am not able to do . Alos i tried to bedug, the total no of rows in Html table does not reflect the dynamically added rows.
1
2027
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 product types etc. So for instance Im adding a fruit company while adding a fruit company I allow the user to add types of fruit they carry and display it dynamically using an <asp:table> with image
6
2665
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 30 options in each combo box and like that if we have 6 or 7 combo boxes in a form, isnt it a problem in creating that number of instances everytime the form is opened/activated 2. How do I dispose the Combo Box items.
9
4480
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 Controls.Add(list), where list is my ListView control, then program hangs for minute. It seems like this time depends on number of records added to control. So probably when adding control to my form, those records are actualy added at this time...
0
1412
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 inherented ACE are still available. What's wrong ? I don't understand the difference between \\server\share and \\server\share\directory while adding a ACE AndyL Sample: \\myserver\myshare Inherited ACE: Administrators, Network Service
0
8443
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...
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
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
7385
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...
0
5663
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();...
0
4366
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2769
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
2011
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.