473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Can't add a dll in VB project

I am not able to add a dll in my VB6 project. It is located in project folder.
I made a declaration in my form
Private Declare Function FindPattern Lib "iEdit_Find.dll" (ByVal lpszPattern As String, ByVal lpszSource As String, ByVal nMatchCase As Long, ByVal nStart As Long, nlen As Long) As Long
but when I run my project it gives the following runtime error:
Run Time Error :53
File not found : iEdit_Find.dll
When I try to add it by Project>>References>>Browse>>select the dll it says:
Cannot add reference to the specified file.
Oct 5 '06 #1
11 30877
sashi
1,754 Expert 1GB
Hi there,

did you register your dll?

kindly follow below method to register dll, take care my fren.. :)

Expand|Select|Wrap|Line Numbers
  1.   regsvr32 somename.dll
  2.  
Oct 5 '06 #2
Hi there,

did you register your dll?

kindly follow below method to register dll, take care my fren.. :)

Expand|Select|Wrap|Line Numbers
  1.   regsvr32 somename.dll
  2.  
thanks but i didnt work
Oct 5 '06 #3
i'm having similar issues with one of the DLLs as well. When i try to register it errors out. My guess is there is something wrong with the actual DLL.
Oct 5 '06 #4
sashi
1,754 Expert 1GB
Hi there,

Always remember, you can only successfully register .dll created with VB, if the particular .dll is not created with vb then just place the .dll in you system32 folder and try again. As sure you will be able to access it, good luck & take care my fren.. :)
Oct 5 '06 #5
Hi Sashi!

Did you get the answer to your question? If yes, please guide me to do the same.

I need to add a .dll file named DASHHARD.DLL to a vb project but can't. It is concerning DMX.

An early soultion shall be highly appreciated.

Thanks!
May 2 '07 #6
I just discovered that the .DLL file instead of the DASHARD.DLL is USBDMXVB.DLL. But I can't include it in my VB project. It cannot be registered due to some reason. I tried putting it in to the Windows\Syatem directory too.

Not much luck today, I Guess...

Malcolm Hourigan
May 2 '07 #7
Killer42
8,435 Expert 8TB
It isn't mentioned anywhere in the thread, so has anyone tried specifying the full path to the DLL in the Declare statement?
May 2 '07 #8
I am not able to add a dll in my VB6 project. It is located in project folder.
I made a declaration in my form
Private Declare Function FindPattern Lib "iEdit_Find.dll" (ByVal lpszPattern As String, ByVal lpszSource As String, ByVal nMatchCase As Long, ByVal nStart As Long, nlen As Long) As Long
but when I run my project it gives the following runtime error:
Run Time Error :53
File not found : iEdit_Find.dll
When I try to add it by Project>>References>>Browse>>select the dll it says:
Cannot add reference to the specified file.


you may try this. i was facing the similar problem, it has worked for me.


give Alias to the function name. it is required if the dll is C++ dll due to compilers name mangling mechanism.

Private Declare Function FindPattern Lib "iEdit_Find.dll" Alias "_FindPattern@20" (ByVal lpszPattern As String, ByVal lpszSource As String, ByVal nMatchCase As Long, ByVal nStart As Long, nlen As Long) As Long


if still it is not working give the full path of the dll instead of "iEdit_Find.dll"
it has to work.
May 2 '07 #9
Open the dll and use c:/windows/system32/regsvr32.exe to open the dll
Hope that could help.
May 3 '07 #10
Hi!
I think I need a small example proggie to explain huw to add a .dll and how to use it.

I need to know how I can program a DMX device.

Any help?
May 14 '07 #11
This problem seems to me to have something to do with App.path.
If I open a project from windows explorer by clicking the vbp file it picks up a non-VB dll in that folder correctly.
If I then close VB, reopen VB and open the project from within VB I get a DLL not found error.
I say it is to do with app.path because on another project, for many years, I have had an inconsistency with filling a file listing box with xls files which uses app.path. Sometimes it opens correctly and others, just the first time it is opened, it uses the VB program folder. Close the box and reopen it and it correctly loads xls files from the project folder. Inconsistent - I never had previously figured it out, it was a minor annoyance that fixed itself after App.path had been called for the first time. .
Of course to fix it properly for the DLL the dll should be moved to the win32 folder and registered with regsvr. Calling app.path before accessing the dll doesn't fix it!
Nov 1 '08 #12

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

Similar topics

2
by: Bodil, Norway | last post by:
Hi, I can't use DataTable! I try to write: Dim myDataTable As DataTable = New DataTable("ParentTable") I then get "Type expected" for the DataTable (in Task List) I have included "Imports...
2
by: Rudy Ray Moore | last post by:
How can I modify the project build order of a multi-project workspace under "Visual Studio .net 2003 7.1 c++"? I tried to modify the .sln by hand to influence the build order, but it didn't seem...
4
by: Brad | last post by:
I'm not one to rant or flame....so please excuse me while I do so for this once. I've now spent a bit of time working with VS2005 beta 2 to see how it functions for web development, especially how...
1
by: Ed Bick | last post by:
Does anybody know..... Can MS Project and Outlook be accessed through com or such so that they can be integrated into a VS app? If the answer is yes, can you point me to some reference...
11
by: Just Me | last post by:
I have a solution containing many usercontrol projects. When I wish to reference a usercontrol in another project I can select either the project or the assembly. Does it make a difference which...
3
by: ahawk | last post by:
Hi, All, I'm a beginner of Vb.net. My solution(A) has reference another object (solution B), so when I debug( trace) my program step by step, the system opens the class code of solution B. My...
2
by: Sam | last post by:
Hi All, I have a solution which consists of multiple projects and each of these projects has their own app.config file. The problem is that all of my projects in the solution pull keys from the...
4
by: | last post by:
I have learned about compartmentalizing my code base using Class Libraries. I have my common code such as my ORM framework broken out into their own Class Libraries, which are referenced as...
1
by: manjunath1985 | last post by:
Hi, Plz answer the follwing question.... Can a project have multiple critical paths?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...

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.