C# calling custom C++ DLL on Pocket PC - hx4700
Hi Guys,
I have been trying for hours (no, days!) to get a simple function that is exported in a C++ (eMbedded C++ 4.0) DLL that is loaded (on my brand new HP hx4700 Pocket PC) in the \Windows folder, to be called from a simple C# Smart Device compiled app (VS.NET 2003).
The DLL code contains:
// This is an example of an exported function.
__declspec(dllexport) int fnSimpleDLL(void)
{
return 42;
}
And for those of you familiar with this, I have also tried a .def file that exports the fnSimpleDLL function without the embelishment.
The C# code looks like:
[DllImport("SimpleDLL", CharSet=CharSet.Unicode)]
public static extern int fnSimpleDLL();
At runtime I get the fatal error System.MissingMethodException.
I also have tried a similar exercise in VB.NET with the same result.
Any ideas why I cannot get the C# to recognize the DLL or the function?