Discussions related to Visual Prolog
- Posts: 12
- Joined: 16 Nov 2012 1:50
If you check this page here https://wiki.visual-prolog.com/index.ph ... _Questions
You are welcome to download How to Use Visual Prolog DLL from .Net example that creates a Visual Prolog DLL and shows how a program, created by Visual Basic .NET, can call a predicate, exported by this DLL.
It is not in the examples folder.
Where is that example ? I can't find it. I'd like to build the interface using C# and call a Prolog DLL is it still possible ?
That would be nice if we could build the GUI with .NET and call Prolog with a DLL.
We are march 2020 and the latest release is Visual Prolog 9
Thank you, bye
Thomas Linder Puls
- VIP Member
- Posts: 1164
- Joined: 28 Feb 2000 0:01
The example is among the examples that can be installed from the Commercial Edition of Visual Prolog (only the Commercial Edition can make DLL's).
It is in the folder useVipInDotNet. And as says: it is possible. But if your intension is to have the GUI in .net all all the business functionality in Visual Prolog then I think it is a bad idea. Data representation in .net and Visual Prolog has little in common (in fact data live in two separate memory spaces, .net managed data and code and Visual Prolog unmanaged data and code as they call it). For each DLL entry point you will have to deal with how data is represented in each of the two worlds.
For cases where the interface is simple (numbers and strings) it is relatively simple, but complex data like arrays in .net and for example lists in Visual Prolog there is no simple relation between the two worlds. Objects cannot be transferred across at all.
Besides this debugging is complex: you can only attach one debugger to a program (at the time) and none of the two relevant debuggers can debug the other side.
Regards Thomas Linder Puls