I have figured out how to DllImport in my C++.NET program but I am
having problems figuring out how to extern my MFC function from a dll
so the C++.NET program can see it.
Any ideas?
I have
public: void BuildASCII( CString sPath )
in the MFC DLL that needs to be used in the .NET program.
I have
[DllImport("dbBuilder.dll", EntryPoint = "BuildASCII", CharSet = Unicode)]
void BuildASCII( System::String* sPath );
...
private: System::Void btnStartBuild_Click(System::Object * sender, System::EventArgs * e)
{
BuildASCII( "./" );
}
in the .NET.
Edit:
In the DLL's .h, I have:
extern "C"
{
void BuildASCII( CString sPath );
}
I get this error in the .NET program:
An unhandled exception of type 'System.EntryPointNotFoundException' occurred in Symbol Database Generator.exe
Additional information: Unable to find an entry point named BuildASCII in DLL dbBuilder.dll.