المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : DLL import problem



C# Programming
05-11-2010, 03:40 PM
Hi All,

I am a newbie for C# currently working on a porting project.
I need to port and use a VC++ (6.0) MFC extesion DLL methods in C# (8.0) application.
To do that,
I created a managed wrapper dll (MFC Regular DLL shared with /CLR turned ON) from C# and referred the MFC extension DLL from it.
But when i call the interface function written in the wrapper DLL from the C# application, I am getting the below error.
"Unable to load DLL 'TestWrapper.dll': Invalid access to memory ********. (Exception from HRESULT: 0x800703E6)"This error occurs only when i add the MFC extension DLL as the dependency to the wrapper dll.
If the remove that dependency 'TestWrapper.dll' loads successfully.
Note: All DLLs and C# application is in the same path. Problem happens in Windows XP SP3.

Any help is appreciated.

Thanks in advance.
Selva