G
Guest
I have a function called GetDoubleData in dll. I would like to declare it in
C#. I have tried the following, but there is an exception ("NotSupported
Exception was unhandled")
Pleeeeeeeeease help me!
Form1.cs
public double doubleData
{
get { return GetDoubleData(); } // "Not supported Exception
unhandled"
}
[DllImport("itscpp.dll", EntryPoint = "GetDoubleData", SetLastError = true)]
public static extern double GetDoubleData();
itscpp.h:
extern "C" __declspec(dllexport) double GetDoubleData();
itscpp.cpp:
__declspec(dllexport) double GetDoubleData()
{
return myData.DoubleData;
}
Thanks,
Frankie
C#. I have tried the following, but there is an exception ("NotSupported
Exception was unhandled")
Pleeeeeeeeease help me!
Form1.cs
public double doubleData
{
get { return GetDoubleData(); } // "Not supported Exception
unhandled"
}
[DllImport("itscpp.dll", EntryPoint = "GetDoubleData", SetLastError = true)]
public static extern double GetDoubleData();
itscpp.h:
extern "C" __declspec(dllexport) double GetDoubleData();
itscpp.cpp:
__declspec(dllexport) double GetDoubleData()
{
return myData.DoubleData;
}
Thanks,
Frankie