Working with DLL in Servoy?

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Working with DLL in Servoy?

Postby felipebortoli017 » Tue Mar 20, 2012 4:31 pm

Working with DLL in Servoy?

Help!!!
felipebortoli017
 
Posts: 24
Joined: Tue Mar 13, 2012 4:10 pm

Re: Working with DLL in Servoy?

Postby ROCLASI » Tue Mar 20, 2012 4:50 pm

Hi Felipe,

I have never used Servoy with DLL's but I think the closest you can get is via https://www.servoyforge.net/projects/servoy-com .

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Working with DLL in Servoy?

Postby felipebortoli017 » Tue Mar 20, 2012 4:57 pm

Much thanks ROCLASI
felipebortoli017
 
Posts: 24
Joined: Tue Mar 13, 2012 4:10 pm

Re: Working with DLL in Servoy?

Postby tparry » Tue Mar 20, 2012 5:15 pm

What do you want to do with a DLL?
tparry
 
Posts: 19
Joined: Tue Jan 31, 2012 3:33 pm

Re: Working with DLL in Servoy?

Postby felipebortoli017 » Tue Mar 20, 2012 6:14 pm

I need to call a dll in Servoy
felipebortoli017
 
Posts: 24
Joined: Tue Mar 13, 2012 4:10 pm

Re: Working with DLL in Servoy?

Postby tparry » Wed Mar 21, 2012 3:46 pm

Does the DLL do only processing or does it have a UI function?

There is a way to call a DLL from Java code (via JNI - Java Native Interface) and therefore from Javascript. But this is a lot of an effort.
For example see:
http://www.java-forums.org/advanced-java/2064-how-call-dll-java.html
Perhaps the functionality can be duplicated in a plugin (Java code)?
tparry
 
Posts: 19
Joined: Tue Jan 31, 2012 3:33 pm

Re: Working with DLL in Servoy?

Postby ptalbot » Wed Mar 21, 2012 6:58 pm

Calling JNI from JavaScript? Oh man. This sounds like a mad plan to me!
Better encapsulate this kind of stuff inside a plugin, yes.
Or use the COM plugin, it's using Jacob which is making it easier...
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Working with DLL in Servoy?

Postby tparry » Wed Mar 21, 2012 8:18 pm

Of course from a plugin! Javascript in Servoy to invoke it!

I wonder about JNA (Java Native Access project) - maybe a better choice.
tparry
 
Posts: 19
Joined: Tue Jan 31, 2012 3:33 pm

Re: Working with DLL in Servoy?

Postby ptalbot » Wed Mar 21, 2012 8:53 pm

JNA is easier. It's the lib used in the BrowserSuite for various Native access.
But still you need a good understanding of how Native objects works, and it can be tricky with C++ Struct

For simple COM usage, Jacob is the way to go.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Working with DLL in Servoy?

Postby tparry » Wed Mar 21, 2012 9:46 pm

@Patrick:
Glad to hear you have used JNA. I have used JNI quite a lot over a several years now to interface MATLAB code that was compiled to Java then I interfaced to several c++ dlls using JNI for some complex (READ MATLAB complex) structures. Not easy to do and quite a lot of effort, iterations and testing.

If JNA can be a production quality tool then it would be a way to go.

In either case one needs to know the dll functions in order to provide a way to call them. I have not seen a generic way to extract the function names return values, types etc yet (e.g. likehttp://www.dependencywalker.com/). Therefore the dll to be used must have some information for the user to "use" (properly and legally of course).

Is there a real need to use dlls in Servoy (encapsulated within plugins) by users or is the feeling that duplicating the functionality in Javascript/Servoy is better for the long maintenance support? I understand that "common" well maintained dlls appear to save development time.

@Felipe
Does this help or or you convinces not to use the dll by now? :)
tparry
 
Posts: 19
Joined: Tue Jan 31, 2012 3:33 pm


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 5 guests

cron