xsharp.eu • Library exposed to COM in X#
Page 1 of 1

Library exposed to COM in X#

Posted: Fri Apr 21, 2023 8:30 pm
by gjbiagiotti
Hello.
I need to create in X# a library exposed to COM, is there a writing that explains how to do it?

Thank you. Gerardo.

Library exposed to COM in X#

Posted: Sat Apr 22, 2023 4:24 am
by wriedmann
Hi Gerardo,
works well, I have a lot of them, and created the last one last week.
Please see:
https://docs.xsharp.it/doku.php?id=com_module_sample
https://docs.xsharp.it/doku.php?id=com_module_sample_vs
https://www.riedmann.it/download/SendMailCOM.zip
https://www.riedmann.it/download/PostgreSQLReader.zip

The first two are documentations, the other two samples and working DLLs (both of them created by myself and used by several people).

If you have questions, please let me know.

Wolfgang

P.S. the main specialist for such libraries is Meinhard Schnoor, and he held a session about this last year in Memmingen. I do not know if you have access to this session material:
https://www.xsharp.eu/itm-downloads/dow ... chnoor.zip

Library exposed to COM in X#

Posted: Sat Apr 22, 2023 10:52 am
by gjbiagiotti
Thanks Wolfgang

Library exposed to COM in X#

Posted: Fri Apr 28, 2023 4:18 pm
by gjbiagiotti
Hello Wolfgang.

Is it possible to create a dll from X# using VO's SQLClasses and DBServer?
And then generate the DLL and the TPL file to import it from VO?

Thank you.
Gerardo

Library exposed to COM in X#

Posted: Sat Apr 29, 2023 4:38 am
by wriedmann
Hi Gerardo,
unfortunately it is not possibile to create an X# DLL using VO libraries.
But you can create an X# library using the X# versions of VO libraries, and build a COM library.
But the COM interface does not knows anything about the special VO and X# datatypes, so you have to build your own interface class and definition to access properties and methods of your COM library.
Therefore the interface can never be compatible to what a VO SQL Editor or a VO DBServer Editor would expect.

But the question I have is: what do you plan to do with such a construct?

Wolfgang