Madhuchhanda
December 14th, 2006, 09:13 PM
I have a native MFC dll which I need to access from the C# application.
I have written a managed C++ wrapper for this dll.My wrapper is a class library project.
The native dll(MFC dll) basically opens a MFC CArchive serialized file and deserializes it.
My c# app needs to access the data in this MFC CArchive.
I pass the filename as parameter to the native Dll member function which should open it and deserialize it.
However,when ever I try to call this function from the C# app -> managed c++ wrapper,the "CFile.Open' fails.On the other hand,the same file is successfully opened when other MFC apps call this native dll.
I have checked if the filename(parameter for the Load function in the native dll) is correctly received in the native dll and it is correct.
Any suggestions/pointers on what the problem might be would be really appreciated.
Thanks
I have written a managed C++ wrapper for this dll.My wrapper is a class library project.
The native dll(MFC dll) basically opens a MFC CArchive serialized file and deserializes it.
My c# app needs to access the data in this MFC CArchive.
I pass the filename as parameter to the native Dll member function which should open it and deserialize it.
However,when ever I try to call this function from the C# app -> managed c++ wrapper,the "CFile.Open' fails.On the other hand,the same file is successfully opened when other MFC apps call this native dll.
I have checked if the filename(parameter for the Load function in the native dll) is correctly received in the native dll and it is correct.
Any suggestions/pointers on what the problem might be would be really appreciated.
Thanks