View Full Version : Lianja extensions in server-side procedures?

2016-02-16, 18:36
Hi everyone,

I'm wondering how to add Lianja extensions to server-side code? In a desktop app you put the dll in the lianja/extensions folder and modify extensions.ini. My extension in there works fine if you run my app as a desktop app. I've done the same thing for lianja/cloudserver/tenants/public/extensions but it doesn't seem to work for me when I preview my app in browser. Is there something extra I should be doing?

For reference, in my little test app I have a little proc called testextension.prg which when called creates an object from the extension and returns "successful" if it worked. I then call that on a commandbutton click with Lianja.evaluate() in my app. On desktop this works and "successful" is returned but in a webapp it spits out the page not found error in the browser console which as I understand it simply means "something went wrong and your call didn't work".

Any help would be greatly appreciated,

2016-02-16, 19:37
Hi Ryan,

What are you wanting to achieve. Extensions are written in C/C++. Are you just wanting to use Lianja/VFP libraries? If so just open thenm using SET PROCEDURE TO filename ADDITIVE or REQUIRE().

Incudentally, you can only use compiled code with the cloud server so you need the .dbo files.

2016-02-16, 20:24
I have a third party Lianja extension whose functions I want to access in my code. Specifically I want to call them in my server-side procs. I have no access to the source code but it comes as a .dll file so I would assume it's written with the C/C++ API?

2016-02-16, 20:26
Are you able to use this in desktop development mode? Is this a chilkat extension?

2016-02-16, 20:50
Yes it works fine in desktop development mode. It is indeed the chilkat extension!

2016-02-16, 20:52
Try manually loading it with a full path.

if if that fails submit a ticket and I will investigate it.

2016-02-16, 21:50
After a bit of testing with loadlibrary it looks like the library gets loaded as it should, even without needing to do it manually, but the createobject command fails when I attempt to build a chilkat object. I'll submit a ticket.

2016-02-16, 21:56
Maybe there is a dependency missing that needs copied into the same directory as your dll is in.

2016-02-17, 10:37
Hi Barry,

I can confirm that on the current Beta build, the Chilkat Crypt2 extension does load in .rsp pages (you fixed #4264 on 15Nov2015). Perhaps Ryan would need to test on the current Beta, was this after the 2.01 release.


2016-02-17, 19:27
Hi Hank,

Ryan is an ISV so he has access to the v2.1 beta which he should download and install.