• Welcome to Valhalla Legends Archive.
 

DLL's

Started by StepAside, July 01, 2004, 12:08 AM

Previous topic - Next topic

StepAside

I'm trying to get into programming DLLs for a lot of my projects to make my life easier. I've never written one before however, so it's confusing me. I create the function within the class of the DLL, and create the .dll. I attempt to call the function with API from another project, and tells me:
"Can't find DLL entry point in blah.dll"

Any suggestions?

Eli_1


Eric

What language is the DLL being written in?

CrAz3D

Quote from: StepAside on July 01, 2004, 12:08 AM
I'm trying to get into programming DLLs for a lot of my projects to make my life easier. I've never written one before however, so it's confusing me. I create the function within the class of the DLL, and create the .dll. I attempt to call the function with API from another project, and tells me:
"Can't find DLL entry point in blah.dll"

Any suggestions?

I use CreateObject().  It works fine for me.  
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

StepAside

Although all but 3 posts were completely off my question, it's ok. I feel the need to bash idiots at times. Anyway, I wrote the DLL in Visual Basic with only a class, an API delcaration, and 2 Public functions written in the the DLL. I then tried to call the functions using API, with the given library as "whatever.dll", (as I named my DLL). I get an error that it cannot find the DLL entry point. Also, I've googled the hell out of it. It only gives me info about the error from the cross-language aspect. IE: VB DLL called from ASP, C++ DLL called from VB, etc. Once again, any help appreciated.

Adron

VB doesn't export functions from a DLL in the way a DLL normally works in every other language.

A VB DLL exports a standard OLE function to allow you to create any public objects defined in the VB DLL project. To use a VB DLL,  you have to create such objects and call methods on them. You can't just "Declare Function" and call them.


StepAside

#6
So basically I'd have to first reference the DLL, then create a class and set it's object to work with the different functions in the DLL?

Adron

Quote from: StepAside on July 02, 2004, 01:31 PM
So basically I'd have to first reference the DLL, then create a class and set it's object to work with the different functions in the DLL?

Yes, something like that. Create an instance of a class defined in the DLL and use the properties / methods of it.

Banana fanna fo fanna

I think it goes something like...

' you must have already regsvr32'd the dll
dim mydll
set mydll = CreateObject("myvbprojectname.myclsname")

CrAz3D

*with mydll being an Object
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Banana fanna fo fanna

yeah i forgot the name