VB.NET .DLL Import Problems

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
stockholm_syndrome
Guest





PostPosted: Fri Feb 11, 2005 2:26 am    Post subject: VB.NET .DLL Import Problems Reply with quote

I am using the 32-bit .dll for a 212 and VB.NET. When I try to add a reference to adc20032.dll in my project the following error occurs:

A reference to 'C:/Program Files/Pico/DRIVERS/win32/adc20032.dll' could not be added. This is not a valid assembly or COM component. Only assemblies with extension 'dll' and COM components can be referenced. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

Anyone else with the same problem, or an answer!?!?!?!

Thanks in advance.
Back to top
Sarah
Guest





PostPosted: Fri Feb 11, 2005 11:35 am    Post subject: Reply with quote

Hi

Thank you for your post.

If you look at MSDN this will give you information on including dll files in VB.net.

Hope this helps

Best Regards
Back to top
Guest






PostPosted: Mon Jul 11, 2005 8:18 am    Post subject: Reply with quote

Hi ,
I too faced same problem .
Can anyone give the solution.
Thanks in advance.

Prasanna
Back to top
dundas
User
User


Joined: 24 Aug 2005
Posts: 4

PostPosted: Wed Aug 24, 2005 2:34 am    Post subject: Reply with quote

Sarah wrote:
Hi

Thank you for your post.

If you look at MSDN this will give you information on including dll files in VB.net.

Hope this helps

Best Regards


Hi Sarah, I am also facing this same issue while I try to reference the win32\adc1132.dll in Visual Basic.Net 2002.

Q1:
The problem is this dll can't be referenced if we "add reference", please instruct us for the correct way or just tell us the name of the way to do it.

Q2:
Is this dll really a 32-bit dll?if not, I guess we have to
http://support.microsoft.com/kb/105761/EN-US/


Any advices are greatly appreciated.
Back to top
dundas
User
User


Joined: 24 Aug 2005
Posts: 4

PostPosted: Wed Aug 24, 2005 8:12 am    Post subject: Reply with quote

ok, I think u simply CANT add that dll as reference. I solved the problem by simply putting that dll into /bin directory of my VB project and add a module wiz

Code:
Module adc1132

    Declare Function adc11_get_driver_version Lib "ADC1132.dll" () As Integer
    Declare Function adc11_open_unit Lib "ADC1132.dll" (ByVal port As Integer, ByVal product As Integer) As Integer
    Declare Function adc11_set_unit Lib "ADC1132.dll" (ByVal port As Integer) As Integer
    Declare Sub adc11_close_unit Lib "ADC1132.dll" (ByVal port As Integer)
    Declare Function adc11_get_unit_info Lib "ADC1132.dll" (ByVal S As String, ByVal lth As Integer, ByVal line_no As Integer, ByVal port As Integer) As Integer
    Declare Sub adc11_set_do Lib "ADC1132.dll" (ByVal state As Integer)
    Declare Function adc11_get_value Lib "ADC1132.dll" (ByVal channel As Integer) As Integer
    Declare Function adc11_set_trigger Lib "ADC1132.dll" (ByVal enabled As Integer, ByVal enable_auto As Integer, ByVal auto_ms As Integer, ByVal channel As Integer, ByVal dir As Integer, ByVal threshold As Integer, ByVal delay As Integer) As Integer
    Declare Function adc11_set_interval Lib "ADC1132.dll" (ByVal us_for_block As Long, ByVal ideal_no_of_samples As Long, ByVal channels As Integer, ByVal No_of_channels As Integer) As Long
    Declare Function adc11_get_values Lib "ADC1132.dll" (ByVal values As Integer, ByVal no_of_values As Long) As Long
    Declare Function adc11_get_times_and_values Lib "ADC1132.dll" (ByVal times As Long, ByVal values As Integer, ByVal no_of_values As Long) As Long

    Declare Auto Function adc11_run Lib "adc1132.dll" (ByVal no_of_values As Long, ByVal method As Short)
    Declare Auto Function adc11_ready Lib "adc1132.dll" () As Short

End Module


which included the functions in that library I need, and it works like a charm.

thx anyways.
Back to top
Guest






PostPosted: Thu Feb 23, 2006 8:14 am    Post subject: Reply with quote

Use Visual Studio 2005 instead. I had the same problem in VS2003, but when i changed to VS2005, the problem was gone Smile
Back to top
blieki
Guest





PostPosted: Mon Jun 19, 2006 10:35 am    Post subject: Reply with quote

Can someone help wit this problem withough getting too complicated or having to switch to vs2005? Mad Mad
Back to top
Guest






PostPosted: Thu Aug 10, 2006 8:46 pm    Post subject: Reply with quote

If you first add the .dll to your bin folder manually, you can then add the reference through Visual Studio 2003 by browsing to that file in the project's bin folder.
Back to top
Guest






PostPosted: Wed Feb 27, 2008 6:56 am    Post subject: importin dll in vb studio 2005 Reply with quote

hii.. i have a c++ file.. which i have to use in vb studio 2005 . i have saved that c++ file in dll format , so its dll file has been created, but when i am importing that file through reference in my vb studio project.. error is coming about invalid com or assembly..

i wanna know whether the way i am creating the dll of c++ file is correct or not..
please help me out..
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group