| | |
Can't open "DLL" File
![]() |
•
•
Join Date: Oct 2007
Posts: 95
Reputation:
Solved Threads: 0
Hi,
Could you please show me where my error is?
I have created one "DLL" file by myself. Then, I want to reuse it in another project, but the system prompt error message whenever I call that "DLL" function.
I created "DLL" with "ActiveXDll". The following is my dll code.
After compiling, I get "project.dll". Finally, I declare this dll's function as below.
Error, run time error "53", is "File not found".
if I declare as , it shows "run time error 453". can't find dll entry point.
How should I solve above problem? Please give me some suggestion.
regards,
zawpai
Could you please show me where my error is?
I have created one "DLL" file by myself. Then, I want to reuse it in another project, but the system prompt error message whenever I call that "DLL" function.
I created "DLL" with "ActiveXDll". The following is my dll code.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Function Adding2(ByVal x As Integer, ByVal y As Integer) As Integer Adding = x + y End Function
After compiling, I get "project.dll". Finally, I declare this dll's function as below.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Declare Function Adding2 Lib "project1.dll" (ByVal x As Integer, ByVal y As Integer) As Integer
Error, run time error "53", is "File not found".
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() Label1.Caption = Adding2(5, 4) End Sub
if I declare as
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Declare Function Adding2 Lib "C:\Documents and Settings\Zawpai\Desktop\test extsiting file 3\project1.dll" (ByVal x As Integer, ByVal y As Integer) As Integer
How should I solve above problem? Please give me some suggestion.
regards,
zawpai
Hi,
First Open a New Project, Goto References, Browse and add the Dll, from the list (Project1.dll)
And Declare like this :
Dim TempCls As New Project1.MyClass
Text1.Text = TempCls.Adding2(4, 10)
The procedure you have declared is for WIN API's..
Regards
Veena
First Open a New Project, Goto References, Browse and add the Dll, from the list (Project1.dll)
And Declare like this :
Dim TempCls As New Project1.MyClass
Text1.Text = TempCls.Adding2(4, 10)
The procedure you have declared is for WIN API's..
Regards
Veena
Last edited by QVeen72; Jun 3rd, 2009 at 2:48 am.
•
•
Join Date: Oct 2007
Posts: 95
Reputation:
Solved Threads: 0
Hi QVeen72,
Thank you for your help. Now, my coding is running well.
May I ask you another question?
Why some dll files don't need to do "browse" and "add"?
I saw they only need to declare function prototype and the function of dll flie can be used directly. Their coding also doesn't need to create as object type. They only put their dll file in the same folder.
Where is the difference with our method?
For my understanding is that I create dll as class type. So, we have to declare as object type before we use its function. Then, we also don't need to declare function prototype.
regards,
zawpai
Thank you for your help. Now, my coding is running well.
May I ask you another question?
Why some dll files don't need to do "browse" and "add"?
I saw they only need to declare function prototype and the function of dll flie can be used directly. Their coding also doesn't need to create as object type. They only put their dll file in the same folder.
Where is the difference with our method?
For my understanding is that I create dll as class type. So, we have to declare as object type before we use its function. Then, we also don't need to declare function prototype.
regards,
zawpai
•
•
•
•
Hi QVeen72,
Why some dll files don't need to do "browse" and "add"?
zawpai
But when you have created a new dll, it may not have been registered, so it does not apper on the list. If you browse and Add, VB6 Automatically Registers the dll for you..
Once you do that, you can notice, if you open a new project, this New dll will appear on the list..
Regards
Veena
![]() |
Similar Threads
- chkdsk starts on each attempted boot-up (Windows NT / 2000 / XP)
- unable to open "my computer", "my documents" (Viruses, Spyware and other Nasties)
- Beginner's question - Unable to open "include" file (C++)
- unable to open "my computer","control panel". (Viruses, Spyware and other Nasties)
- Spyware? hijacked cursor at "2:Open" sign (Viruses, Spyware and other Nasties)
- Problems with "Bridge.dll" (Viruses, Spyware and other Nasties)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: SQL DataSet Exception
- Next Thread: Problem in reading Outlook Express DBX files ...
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





