I am trying to get the Decalre statement to work with a custome DLL. I assumed this would work with any DLL, but Designer Help constantly refers to this as “Declaring C Functions”. My DLL is written in VB.NET. Does anyone know if this matters? I am receiving “External function not found” using the statement “Declare Function Test Lib “QBLink.dll” Alias “Test” () As String”. My DLL only has 1 function in it, called Test, and it simply pops a messagebox “Here”.
I have read every single post about external functions in this forum, and nothing answers my question. Thanks in advance.
The language used to develop the DLL doesn’t matter at all.What matters is the ‘type’ of functions you define and a VB.NET DLL should be a ‘c’ type DLL.
I would guess your problems arise from the system not finding the DLL.
Have you copied the DLL to the Notes executable (probably c:\notes) directory?
If not, you must specify the complete path in the DLL declaration, like this:
Declare Function Test Lib “c:\mylib\QBLink.dll” Alias “Test” () As String
Alternatively, you could set the system environment variables to include your library. Note that if you do that, each machine will need that setting.
You may experience problems with passing/receiving strings to/from DLL’s. A LotusScript string is not the same as a ‘c’ type string. If possible, avoid passing/receiving strings and use integer or long instead.