|
-
Nov 16th, 1999, 01:56 AM
#1
Thread Starter
Addicted Member
hi
i created a dll with one function. i compiled this dll and created a normal exe project and wanted to test the dll.
i declared the dll and wrote some code.
but when i want to call the function in the dll, vb says, i wasn't able to find the point in the dll.
this is the first time, i work with dlls.
please help me!!!
-
Nov 16th, 1999, 02:10 AM
#2
It depends. If you created this DLL in VB then this DLL is an ActiveX DLL. So you have to add a reference to this DLL by going to Project-->References....
If you created this DLL in C/C++ or Delphi as static DLL then you have to declare this dll like:
Private [Public] Declare Function YourFunctionName Lib "YourDLLName" (ByVal YourParameter As YourDataType) As Long
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Nov 16th, 1999, 02:23 AM
#3
Thread Starter
Addicted Member
thanx, do i have to create the reference on the other (default exe) project???
-
Nov 16th, 1999, 02:42 AM
#4
No, basically, when you're creating a new project and want to use your DLL, then you would set a reference to that DLL (put a check mark on the DLL you've created in the reference List). Then you would declare a variable as your DLL's class.
Dim oMyVariable As New YourDLL.YourClass
Then you would use the function that you've created:
Call oMyVariable.MyFunction(YourParameter)
THen, you compile your EXE. And when you give this EXE to the user, you would have to give him/her this DLL as well. But the best way is to create a Setup for your program. VB5 has Setup Wizard (VB6 Package and Deployment Wizard) which will include all needed files for your aplication.
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 11-16-1999).]
-
Nov 16th, 1999, 02:59 AM
#5
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|