Somma dll

Antworten
Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Somma dll

Beitrag von Millman » Sonntag 14. Oktober 2012, 17:03

I ask you to help to create a running sum with a dll.
You tell me what to do?
I need to learn how to test.
thanks




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

namespace Somma
{
public class Somma
{
public static class Somma
{
public static int Somma(int a, int b)
{
return a + b;
}
}



}
}

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Somma dll

Beitrag von Millman » Freitag 19. Oktober 2012, 07:46

Place the right code, I hope someone can help.
Hi




void NumInputs()
{
return 2;
}


void NumOutputs()
{
return 3;
}


void GetInputName(uchar Channel, uchar *Name)
{
switch(Channel)
{
case 0: strcpy((uchar *)Name, "Num1"); break;
case 1: strcpy((uchar *)Name, "Num2"); break;
}
}


void GetOutputName(uchar Channel, uchar *Name)
{
switch(Channel)
{
case 0: strcpy((uchar *)Name, "Add"); break;
case 1: strcpy((uchar *)Name, "Sub"); break;
case 2: strcpy((uchar *)Name, "Mul"); break;
}
}


void CCalculate(double *PInput, double *POutput, double *PUser)
{
POutput[0] = PInput[0] + PInput[1]; // add
POutput[1] = PInput[0] - PInput[1]; // subtract
POutput[2] = PInput[0] * PInput[1]; // multiply
}

Millman
Beiträge: 35
Registriert: Freitag 7. September 2012, 07:40

Re: Somma dll

Beitrag von Millman » Montag 22. Oktober 2012, 09:17

thanks WoB

Antworten

Zurück zu „DLL-Programmierung“