Posted By: brussell | Sep 19th, 2005 @ 2:04 PM
page 1 of 1
Comments: 2 | Views: 12266
I have a utility that I am writing in C++.NET.
I wrote three MFC DLLs.

I am trying to inlude and use the DLLs in the utility.

namespace dbBld91
{
    using namespace System::Runtime::InteropServices;
    [DllImport("dbBuilder91.dll", EntryPoint = "BuildASCII")]
    extern "C" void BuildASCII( int iType );
}
namespace dbBld90
{
    using namespace System::Runtime::InteropServices;
    [DllImport("dbBuilder90.dll", EntryPoint = "BuildASCII")]
    extern "C" void BuildASCII( int iType );
}
namespace dbBld80
{
    using namespace System::Runtime::InteropServices;
    [DllImport("dbBuilder80.dll", EntryPoint = "BuildASCII")]
    extern "C" void BuildASCII( int iType );
}

namespace SymbolDatabaseGenerator
{
    ...
    dbBld91::BuildASCII( iVendor );
    ...
}

No matter what namespace I tell it to call BuildASCII() from, it uses the DLL that is imported last (currently dbBld80).

Any ideas how to fix this? I need to use all the DLLs.
Sven Groot
Sven Groot
You can't have everything; after all, where would you put it?
Why not just use the old fashioned way with LoadLibrary and GetProcAddress?
page 1 of 1
Comments: 2 | Views: 12266