FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Using C# (and .NET) from FWH
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Using C# (and .NET) from FWH
Posted: Tue Jun 26, 2018 04:58 PM
We have done a major advance on using C# (or any other .NET based language) from FWH :-)

This is going to be part of FWH 18.05

For now, please start testing this:

1. How to build a C# DLL:

test.cs
Code (fw): Select all Collapse
using System.Windows.Forms;

namespace dllNamespace
{
    public class dllClass
    {
        public static int ShowMsg( string msg )
        {
            MessageBox.Show( msg );
            return 0;
        }
   }
}


To build it as a DLL do this:
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
csc /out:test.dll /target:library test.cs

Next: I will explain you how to run it from FWH 18.05 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 39
Joined: Wed Jun 25, 2014 11:16 AM
Re: Using C# (and .NET) from FWH
Posted: Tue Jun 26, 2018 06:46 PM

Show, thats fantastic !!!!! \o/

FW 17.09 - xHB 1.2.3 - Embarcadero C++ 7
xDevStudio 0.72 - FivEdit ( \o/ ) - Pelles C
MySQL 5.7 - DBF
FastReport - PHP for Web Services - Java Android
http://matheusfariasdev.wordpress.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Using C# (and .NET) from FWH
Posted: Tue Jun 26, 2018 07:42 PM

Antonio,

As you advance with this, perhaps you can keep in mind how we might turn a FWH program into a service. We've discussed this before, but never came to the point of an actual working service that can run in the background. We got builds, but it would not actually run. Maybe with this new technology we can actually accomplish that goal.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Using C# (and .NET) from FWH
Posted: Wed Jun 27, 2018 01:39 PM
This is already working :-)

dotnet.prg
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   FW_DotNet( "test.dll", "dllNamespace.dllClass", "ShowMsg", "C# from FWH" )

   FW_DotNet( "test.dll", "dllNamespace.dllClass", "ShowMsg", "yes!!!" )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Using C# (and .NET) from FWH
Posted: Wed Jun 27, 2018 02:05 PM

.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Using C# (and .NET) from FWH
Posted: Wed Jun 27, 2018 02:15 PM

.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 883
Joined: Tue Oct 11, 2005 11:57 AM
Re: Using C# (and .NET) from FWH
Posted: Wed Jun 27, 2018 03:14 PM

Nice...
I will follow this topic, since I drop some developments because I couldn't access some .NET dll's and Libs

Greetins
From Chile
Adolfo

;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
Posts: 182
Joined: Tue Oct 18, 2005 10:01 AM
Re: Using C# (and .NET) from FWH
Posted: Thu Jun 28, 2018 12:56 PM

fantastic job, a big door is open now !

thank you.

Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Using C# (and .NET) from FWH
Posted: Thu Jun 28, 2018 01:10 PM

It's really great!

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Using C# (and .NET) from FWH
Posted: Thu Jun 28, 2018 05:24 PM

We are building a CLASS TDotNet ;-)

To be included in FWH 18.05

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: Using C# (and .NET) from FWH
Posted: Fri Jun 29, 2018 10:58 AM

Aha, Closer to my arduino then :wink:

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Using C# (and .NET) from FWH
Posted: Thu Jul 19, 2018 02:14 PM

Antônio,
Is it not ready yet ?
I thought would be included in FWH 18.05 :(

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Using C# (and .NET) from FWH
Posted: Fri Jul 20, 2018 05:58 AM

Vilian,

Class TDotNet is already included in FWH 18.05 :-)

Please go to FWH\samples and do:

buildh.bat dotnet

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 140
Joined: Tue Oct 11, 2005 02:36 AM
Re: Using C# (and .NET) from FWH
Posted: Fri Jul 20, 2018 06:52 PM

Hello, friends

is it possible to use the FAST-REPORT.NET in this case?

I'm hanging on

Jackson Douglas C. Brito

Boa Vista - RR - Brasil

FWH 12.09 Last Build

xHarbour Free

UESTUDIO

SQLRDD
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Using C# (and .NET) from FWH
Posted: Fri Aug 03, 2018 08:07 PM
miragerr wrote:Hello, friends

is it possible to use the FAST-REPORT.NET in this case?

I'm hanging on

Please
Send me or put a sample of how you are using the DLL now
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces