P
peter.amberg
Hi
I'm trying to write a C++ DLL and use it in C#. In C++, I created a
Win32 project and added a function
__declspec(dllexport) int __cdecl TestAdd (int a, int b)
{
return a + b;
}
I gather I do not need an Export.def file when using
__declspec(dllexport), right? I could compile the DLL, anyhow.
In C#, I write:
[DllImport(@"C:\bla\bla\mydll.dll", EntryPoint="TestAdd")]
public static extern int TestAdd(int a, int b);
This compiles, but I get an EntryPointNotFound exception at runtime. I
guess my TestAdd method was not really exported. Is there a quick way
to view all exported symbols of a DLL? Any other ideas?
Thanks,
Peter
I'm trying to write a C++ DLL and use it in C#. In C++, I created a
Win32 project and added a function
__declspec(dllexport) int __cdecl TestAdd (int a, int b)
{
return a + b;
}
I gather I do not need an Export.def file when using
__declspec(dllexport), right? I could compile the DLL, anyhow.
In C#, I write:
[DllImport(@"C:\bla\bla\mydll.dll", EntryPoint="TestAdd")]
public static extern int TestAdd(int a, int b);
This compiles, but I get an EntryPointNotFound exception at runtime. I
guess my TestAdd method was not really exported. Is there a quick way
to view all exported symbols of a DLL? Any other ideas?
Thanks,
Peter