DLL and LotusScript Help Needed

I’m having a tough time accessing a function from within a .dll file. Here is what I have in my code…

Declare Function UploadFile Lib “C:\Program Files\lotus\notes\wamdll\WAMObjects.dll” Alias “WAM” (sFile As String, sURL As String) As String

sResults = UploadFile(sFileRet, sURL)

I keep getting a “External function not found” error message. Anyone have any ideas?

Subject: DLL and LotusScript Help Needed

Read this document…from the notes4 & 5 forum. This might help.

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/1784875e0716ea5685256d3d0034abbd?OpenDocument

Sai

smaganti@dek.com

Subject: RE: DLL and LotusScript Help Needed

YES!!! YES!!! FREEEEEEDOM!!!

Thanks so much for the post. That was all I needed.

Regards,

Chris

Subject: Well…

…does the file “C:\Program Files\lotus\notes\wamdll\WAMObjects.dll” actually exist? According to your error message, it doesn’t.

Thomas - IBM

Subject: RE: Well…

Good question. I was assuming that it found the file but couldn’t locate the function.

I’m running the agent manually so does that mean that the .dll file needs to be local or on the server? I definitely have it installed locally in that location.

It was written in VB so there are a .cls, .vbp, .vbw, .exp and .lib in the same directory. The function is found in the .cls file and I have no idea what is in the .dll file.

Thanks.

Subject: COM vs. exported functions in DLLs in VB…

Out of the box, you cannot easily just export a function in a .dll file created by VB. There are ways to do it, but they are cumbersome and not really worth the trouble. VB only supports COM .dlls, in which case you need to use CreateObject() to instantiate a COM object based on your .dll’s ProgID name, and then you can call the methods defined in your class…

Thomas - IBM