• How to use a c# dll in Clarion 6.3

    From paul.blero@21:1/5 to All on Tue Sep 10 01:22:27 2019
    Hello,

    I must use a C# dll writing by another company in my application (multi dlls).

    This dll contains a public class which contain a public method.

    When I try to load this dll in libmaker, I receive nothing.

    Here is the structure :

    namespace RegisterDocument
    {
    public static class CallApiDocument
    {
    public static bool Action(string processType, string key)

    Is it possible to use this in Clarion and how to proceed ?

    Thanks

    Paul

    Biac

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Shandin@21:1/5 to paul.blero on Tue Sep 10 23:41:04 2019
    On Tuesday, September 10, 2019 at 10:22:28 AM UTC+2, paul.blero wrote:
    Hello,

    I must use a C# dll writing by another company in my application (multi dlls).

    This dll contains a public class which contain a public method.

    When I try to load this dll in libmaker, I receive nothing.

    Here is the structure :

    namespace RegisterDocument
    {
    public static class CallApiDocument
    {
    public static bool Action(string processType, string key)

    Is it possible to use this in Clarion and how to proceed ?

    Thanks

    Paul

    Biac

    Hi.
    There is a very good article at ClarionMag: Clarion and C#.NET Interop without COM.
    Hope it will help.
    Zoran.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From cbordeman@outlook.com@21:1/5 to paul.blero on Tue Sep 17 12:35:05 2019
    On Tuesday, September 10, 2019 at 4:22:28 AM UTC-4, paul.blero wrote:
    Hello,

    I must use a C# dll writing by another company in my application (multi dlls).

    This dll contains a public class which contain a public method.

    When I try to load this dll in libmaker, I receive nothing.

    Here is the structure :

    namespace RegisterDocument
    {
    public static class CallApiDocument
    {
    public static bool Action(string processType, string key)

    Is it possible to use this in Clarion and how to proceed ?

    Thanks

    Paul

    Biac

    If you haven't figured this out yet or don't want a sub to ClarionMag, you do this by annotating your C# method with interop attributes like so:

    https://stackoverflow.com/questions/11425202/is-it-possible-to-call-a-c-function-from-c-net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)