Call dll file from LS agent or Java agent

There is this dll file (sits on C drive of domino server) has some functions which fetches data, and returns a data object.

I would like to call some functions from a Web Query Open agent, but how could I achieve this?

This is what I have done so far:

  1. use Declare function xxx lib “C:\xxx.dll” Alias “xxx” (arg list) as ReturnType

  2. and then call the function like this:

returnVaule = xxx(arg list)

But I get external function not found error. Is there anything I am missing, or could anyone point me to the right deriction for this?

many thanks in adv

christina

Subject: call dll file from LS agent or Java agent

Sounds like the alias is probably incorrect – check for upper/lower case as many are case sensitive.

Do you have the source code of the dll?

Check and double check the declaration to see if the parameter and return types are correct before you try it because this can easily cause a Notes client crash. :o)

If you need to register the dll (on Win/32 platform) you can do so with regsvr32.exe in system32 directory.

You can make Java calls to dlls via JNI.

hth,

dgg

Subject: RE: call dll file from LS agent or Java agent

First you should not use the full path in the DLL name. Make sure the DLL is in the PATH

Second, getting the declaration correct is a fine art and depends on things like whether or not you need to be able to pass ‘null’ to certain parameters.

Would need the ‘C’ declaration of the function to say any more.

Subject: RE: call dll file from LS agent or Java agent

Thank you guys for your replies.

Will try and get back to you soon.

christina