Hi there,
I have a question about Interop between C# and C/C++. That's the situation :
- I need to develop a C# dll (MS VS2010)
- A c++ software (C++ Builder IDE) must call this dll in order to do some stuff
This is the code of the calling method (C++) :
if (enCr == OK)
{
asDllName = asTagValue; sprintf(aucNameDLL, "%s\\%s\\%s.dll", ExtractFileDir(argv[0]).c_str(), asDllName.c_str(), asDllName.c_str());
if (!(hinstDLL=LoadLibrary(aucNameDLL)))
{
enCr = ER_LOAD_DLL;
}
}
if (enCr == OK)
{
if ((ImpDllRequest = (DLL_FUNC_REQQUEST)GetProcAddress(hinstDLL, "enXmlRequest"))==NULL)
{
enCr = ER_LOAD_FUNCTION;
}
}
I found some informations about this kind of problem here :
http://www.codeproject.com/KB/cs/ManagedCOM.asp[
^]
But I have to put in the C++ software static informations.
Does exists a way to call C# dll in a dynamic way, like my example over.
Not sure my explanations are understable but English is not my foreign language, so just ask questions, I will try to answer.
BaptX