>c:\dlltest\testing\testing\testing.cpp(12): error C2065: 'IEasyLanguageObject' : undeclared identifier
1>c:\dlltest\testing\testing\testing.cpp(12): error C2065: 'pELObj' : undeclared identifier
1>c:\dlltest\testing\testing\testing.cpp(12): error C2062: type 'double' unexpected
1>c:\dlltest\testing\testing\testing.cpp(13): error C2143: syntax error : missing ';' before '{'
Here is my code:
Code: Select all
#import "C:\Program Files\TS Support\MultiCharts\PLKit.dll"
#include <stdexcept>
#include <iostream>
using namespace std;
extern "C" double _stdcall Add(IEasyLanguageObject *pELObj, double a, double b)
{
return (a + b);
};
extern "C" double _stdcall Subtract(IEasyLanguageObject *pELObj, double a, double b)
{
return (a - b);
};
extern "C" double _stdcall Multiply(IEasyLanguageObject *pELObj, double a, double b)
{
return (a * b);
};
extern "C" double _stdcall Divide(IEasyLanguageObject *pELObj, double a, double b)
{
if (b == 0)
{
throw new invalid_argument("b cannot be zero!");
};
return (a / b);
};