Using C# (and .NET) from FWH

Using C# (and .NET) from FWH

Postby Antonio Linares » Tue Jun 26, 2018 4: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: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Using C# (and .NET) from FWH

Postby MFarias » Tue Jun 26, 2018 6: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
User avatar
MFarias
 
Posts: 39
Joined: Wed Jun 25, 2014 11:16 am
Location: João Pessoa,PB - Brazil

Re: Using C# (and .NET) from FWH

Postby TimStone » Tue Jun 26, 2018 7: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
User avatar
TimStone
 
Posts: 2943
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Using C# (and .NET) from FWH

Postby Antonio Linares » Wed Jun 27, 2018 1:39 pm

This is already working :-)

dotnet.prg
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Using C# (and .NET) from FWH

Postby Antonio Linares » Wed Jun 27, 2018 2:05 pm

.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Using C# (and .NET) from FWH

Postby Antonio Linares » Wed Jun 27, 2018 2:15 pm

.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Using C# (and .NET) from FWH

Postby Adolfo » Wed Jun 27, 2018 3: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
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: Using C# (and .NET) from FWH

Postby toninhofwi » Thu Jun 28, 2018 12:56 pm

fantastic job, a big door is open now !

thank you.
toninhofwi
 
Posts: 172
Joined: Tue Oct 18, 2005 10:01 am

Re: Using C# (and .NET) from FWH

Postby vilian » Thu Jun 28, 2018 1:10 pm

It's really great!
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 972
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Using C# (and .NET) from FWH

Postby Antonio Linares » Thu Jun 28, 2018 5:24 pm

We are building a CLASS TDotNet ;-)

To be included in FWH 18.05
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Using C# (and .NET) from FWH

Postby Marc Venken » Fri Jun 29, 2018 10:58 am

Aha, Closer to my arduino then :wink:
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1425
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Using C# (and .NET) from FWH

Postby vilian » Thu Jul 19, 2018 2: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
User avatar
vilian
 
Posts: 972
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Using C# (and .NET) from FWH

Postby Antonio Linares » Fri Jul 20, 2018 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Using C# (and .NET) from FWH

Postby miragerr » Fri Jul 20, 2018 6: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
User avatar
miragerr
 
Posts: 140
Joined: Tue Oct 11, 2005 2:36 am
Location: Brasil

Re: Using C# (and .NET) from FWH

Postby cnavarro » Fri Aug 03, 2018 8: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 43 guests