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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to DLL world

Status
Not open for further replies.

Guru2B

Programmer
May 24, 2000
77
GB
Hi,

I have been doing some research on dll files and I was looking for an answer to this:

I have built a DLL in VB. I compiled it with no problems.
I declare the dll at the form level:

Public Declare Function TEST lib "test.dll" (sPass as string) as integer

Then I try to use the function:

text1.text = TEST(text2.text)

When I run the app I get the error Can't find entry point in dll....

What am I doing wrong?

Thanks,
Guru2B
 
Okay,

When you have built a DLL in VB and compiled it, you dont need to do call it in that way.

Instead do this...

1)Goto the project menu and select 'references'.
2)Find the DLL in the list and put a tick by it.
3)in your code use...

dim myObject as Test.Test
set myObject = new Test.Test
text1.text = myObject.Test(text2.text)

... And that should be that. The reason for this is that a VB DLL is actually an ActiveX dll and is therefore an object library.

Dan.



 
Thank you. I found that method works.

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top