Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   .NET (https://www.clubdelphi.com/foros/forumdisplay.php?f=17)
-   -   Código a C++ (https://www.clubdelphi.com/foros/showthread.php?t=68360)

REHome 09-06-2010 17:09:38

Código a C++
 
Buenas:

Quiero pasar este pedazo de código de C# a C++ 2010. ¿Cómo es?

Código:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Runtime.InteropServices; // No olvidar aqui.

namespace Puerto_paralelo
{
    class PortInterop
    {
        [DllImport("inpout32.dll", EntryPoint = "Out32")]
        public static extern void Output(int adress, int value);
        [DllImport("inpout32.dll", EntryPoint = "Inp32")]
        public static extern int Input(int adress);
    }
}

He creado una clase como indica abajo.

http://r.i.elhacker.net/cache?url=ht...images/130.png

http://r.i.elhacker.net/cache?url=ht...images/131.png

http://r.i.elhacker.net/cache?url=ht...ges/132sys.png

A partir de aquí se me crearon el .h y el .cpp. Por aquí estoy perdido y no se como pasarlo de C# a C++ con Visual C++ 2010.

http://r.i.elhacker.net/cache?url=ht...images/133.png

http://r.i.elhacker.net/cache?url=ht...ges/134eoe.png

Saludo.


La franja horaria es GMT +2. Ahora son las 22:39:38.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi