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 ++.
Thank you.
Continue reading...
What it does is read a dll made in C ++.
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 you.
Continue reading...
Last edited by a moderator: