Seite 1 von 1

Somma dll

Verfasst: Sonntag 14. Oktober 2012, 17:03
von Millman
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;
}
}



}
}

Re: Somma dll

Verfasst: Freitag 19. Oktober 2012, 07:46
von Millman
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
}

Re: Somma dll

Verfasst: Montag 22. Oktober 2012, 09:17
von Millman
thanks WoB