Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jump-Point into dll not found

Status
Not open for further replies.

wrchto

IS-IT--Management
Jan 3, 2001
14
AT
I have a selfmade dll with two functions. I want to call one function from my main-program but I always get an error.
The error-code is 453. The message is that the point to jump into the dll cannot be found. Can anyone tell me my error?

dll (named UserAuth.dll as ActiveX-dll):
**********************************************
Private Function CheckAuthUser() As String
Dim RetStr As String
RetStr = "Test"
CheckAuthUser = RetStr
End Function

Main Program:
**************
Private Declare Function CheckAuthUser Lib "UserAuth.dll" () As Boolean

Private Sub Form_Load()
Aufruf = CheckAuthUser
End Sub

The line "Aufruf = CheckUserAuth" gets the error!

Hope, anyone can help me!

Thank you
Thomas
 
Is the DLL you are calling written in VB. If so, You cannot access a function by declaring it as above. This method should only be used to access functions in dll's written in 'C' and that have been exported.

For DLL's written in VB you need to encapsulate the function in a class module and create an instance of the class. you can then access the properties and methods on the class.

Hope this helps,


Chris Dukes
 
Dear wrchto

Please add an alias to ur function declaration eg...

Private Declare Sub Msg Lib "\\Ntserver_dvi\maheshs\vb6\Prj_Test.dll" Alias "#1" ()

Hope this solves the problem.

Bye
Mahesh (mshetti)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top