M
Metaconta
Guest
I want to make this code in C # console, adapt it to F #.
What it does is read a dll made in C ++.
using System;
using System.Runtime.InteropServices;
namespace Consola_cs
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(Marshal.PtrToStringAuto(SUPER_DLL.Mensaje()));
Console.WriteLine(SUPER_DLL.Suma(1764, -764).ToString());
// Pulse cualquier tecla para salir.
Console.ReadKey();
}
internal class SUPER_DLL
{
[DllImport("Super_dll.dll")]
extern static public int Suma(int a, int b);
[DllImport("Super_dll.dll")]
extern static public IntPtr Mensaje();
}
}
}
Thank yoy.
Electrónica PIC
Continue reading...
What it does is read a dll made in C ++.
using System;
using System.Runtime.InteropServices;
namespace Consola_cs
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(Marshal.PtrToStringAuto(SUPER_DLL.Mensaje()));
Console.WriteLine(SUPER_DLL.Suma(1764, -764).ToString());
// Pulse cualquier tecla para salir.
Console.ReadKey();
}
internal class SUPER_DLL
{
[DllImport("Super_dll.dll")]
extern static public int Suma(int a, int b);
[DllImport("Super_dll.dll")]
extern static public IntPtr Mensaje();
}
}
}
Thank yoy.
Electrónica PIC
Continue reading...