It would be nice to use a .NET Dll with Fivewin and I tried the sample, but nothing happend, literally nothing. So I created my own Dll and changed the sample dotnet.prg to this:
Code: Select all
#include "FiveWin.ch"
function Main()
local oNet
oNet := TDotNet():New()
? IIF(oNet != nil, "Net yes!", "Net no :(")
XBrowse(__objGetValueList(oNet))
oNet:Execute("SimpleDllFramework.dll", "SimpleDllFramework.Class1", "GetNumber", 2)
? oNet:GetNetError()
? oNet:GetReturnValue()
oNet:End()
return nil
Code: Select all
┌────────────────────────────────────────────────────────────────────────────┐
?FiveWin for xHarbour 19.03 - Mar. 2019 xHarbour development power │▄
?(c) FiveTech 1993-2019 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█
└────────────────────────────────────────────────────────────────────────────┘?
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀?
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20190603)
Copyright 1999-2018, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'dotnet.prg' and generating preprocessed output to 'dotnet.ppo'...
Generating C source output to 'dotnet.c'...
Done.
Lines 27, Functions/Procedures 1, pCodes 69
Embarcadero C++ 7.30 for Win32 Copyright (c) 1993-2017 Embarcadero Technologies,
Inc.
dotnet.c:
Turbo Incremental Link 6.80 Copyright (c) 1997-2017 Embarcadero Technologies, In
c.
* Application successfully built *
What went wrong?
I appreciate every hint I could get here
Thanks in advance.
The simplest Dll I could imagine
Code: Select all
namespace SimpleDllFramework
{
public class Class1
{
public static int GetNumber(int input = 1)
{
return input * 10;
}
}
}
Sincerely