working with dll
hi.......can anyone tell me how do i call a subroutine created inside my dll from another project
example:-
i hv created a dll having a sub-routine named "initialize" in it .....when i call this sub-routine from my project after having made all the necessary declarations its giving me an error showing "entry point not found for initialize in enc.dll" which is the name by which i have created the dll....
initialize is having two string type parameters passed to it....
and i am calling the dll as
initialize a,b
where a and b both are strings.....
can anyone plz help me sort out this problem....
anud18
Junior Poster in Training
52 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
i opened up the activeX DLL and did the coding inside that....then afterwards there was a option in the file menu -"make enc.dll" which i made and saved it in the same folder as the project....
is this what is called registering a dll....???
anud18
Junior Poster in Training
52 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
i am sorry sir....but i could not actually get how to specifically specify the entry point....
anud18
Junior Poster in Training
52 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
thanx veena .....but when i am trying to browse and add the dll refrence in my new project....it doesnt show up in the available refrences .....it means that it is not bein added .....
anud18
Junior Poster in Training
52 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
tried it but it is not working.....still showing the error "cannot find entry point for function in the dll"....
anud18
Junior Poster in Training
52 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
actually what i did was .....in the project properties under the debugging tag....i specified the start programme as the exe file of my project....and then when i am running the dll....its showing the same error as it is showing wen i run the project.....that is "cant find dll entry point "....
anud18
Junior Poster in Training
52 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
[code]Public Function Initialize(sUserName As String, sPassword As String)
CboUserName.AddItem (sUserName)
CboPassword.AddItem (sPassword)
End Function
Public Function ShowForm() As Boolean
Form1.Show
End Function
Public Function PassCheck() As Boolean
If Ctr1 = 1 Then
PassCheck = False
Else
PassCheck = False
End If
End Function
[\code]
the above one is the dll code
Declare Sub ShowForm Lib "enc1.dll" ()
Declare Sub Initialize Lib "enc1.dll" (ByVal sUserName As String, ByVal sPassword As String)
Declare Function PassCheck Lib "enc1.dll" () As Boolean
then in the sub i am calling....
ShowForm
and its giving an error "cant find dll entry point for ShowForm in enc1.dll"....
anud18
Junior Poster in Training
52 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
show form is there sir......its not indented properly....but it is there
anud18
Junior Poster in Training
52 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0