R
raludamian
Hello!
I'm trying to develop a GIS mapping software on smart devices using VS
2005, C#. need to use a library that was written in C++. Being open
source I compiled the C++ code VS 2005 --> C++ --> Smart Devices and I
obtained a DLL. Now I need to access the DLL functions (unmanaged
code) from my C# (managed code) application. Unfortunatelly I got a
"Can't find PInvoke dll" problem.
Afterwards I tryed to do a simple C++ Smart Device DLL:
extern "C" __declspec(dllexport) int __stdcall fntest_C()
{
return 42;
}
and just use it in C# to se if it works:
[DllImport("test_C_2.dll",EntryPoint="fntest_C")]
public static extern int fntest_C();
But again I got the same error.... I really don't understand!
I tied also dumpbin.exe /EXPORTS:
:
Section contains the following exports for test_C_2.dll
00000000 characteristics
45FA72B6 time date stamp Fri Mar 16 12:34:30 2007
0.00 version
1 ordinal base
1 number of functions
1 number of names
ordinal hint RVA name
1 0 00001000 fntest_C = fntest_C
Please help... I really don't know what to do... Should I try to
compile the C++ code using eVC instead of VS2005 ? I mention that I
have copied the C++ dll in the same directory as the C# exe file...
Thank you for your patience...
Kind regards,
Raluca
I'm trying to develop a GIS mapping software on smart devices using VS
2005, C#. need to use a library that was written in C++. Being open
source I compiled the C++ code VS 2005 --> C++ --> Smart Devices and I
obtained a DLL. Now I need to access the DLL functions (unmanaged
code) from my C# (managed code) application. Unfortunatelly I got a
"Can't find PInvoke dll" problem.
Afterwards I tryed to do a simple C++ Smart Device DLL:
extern "C" __declspec(dllexport) int __stdcall fntest_C()
{
return 42;
}
and just use it in C# to se if it works:
[DllImport("test_C_2.dll",EntryPoint="fntest_C")]
public static extern int fntest_C();
But again I got the same error.... I really don't understand!
I tied also dumpbin.exe /EXPORTS:
:
Section contains the following exports for test_C_2.dll
00000000 characteristics
45FA72B6 time date stamp Fri Mar 16 12:34:30 2007
0.00 version
1 ordinal base
1 number of functions
1 number of names
ordinal hint RVA name
1 0 00001000 fntest_C = fntest_C
Please help... I really don't know what to do... Should I try to
compile the C++ code using eVC instead of VS2005 ? I mention that I
have copied the C++ dll in the same directory as the C# exe file...
Thank you for your patience...
Kind regards,
Raluca