Guest Metaconta Posted October 21, 2021 Posted October 21, 2021 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. http://electronica-pic.blogspot.com Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.