I have a solution in vs 2005. I have an unmanaged class library (RSMSAdapter.dll) that has a class named client adapter. I have a managed class library (ExternalApplication.dll) that has a managed class (ExternalAdapter) and unmanaged class (UnmanagedAdapter) that extends (ClientAdapter from RSMSAdapter.dll) Now a c# class ExternalParticipant, only interacts with managed ExternalAdapter objects, however, in this interaction (under the hood) the ExternalAdapter instantiates an UnmanagedAdapter. At this point, the application stalls in the translation from managed to native code. There are no run-time exceptions thrown I cannot step any further in the call stack to see what is going on. I have all the necessary .dlls in proper places (I am even a bit redundant at times). Here is a mock up of the code (well at least the vital parts). Note: The RSMSMailman you will see in the constructor of the ClientAdapter is an unmanaged class in RSMSAdapter.dll.
// RSMSAdapter.dll -----------------------------------------------------
class ClientAdapter
{
public:
ClientAdapter( RSMSMailman *)
// does its unmanaged business
};
// ExternalApplication.dll ------------------------------------------------
// UnmanagedAdapter.h *****************************
#include <..path to ClientAdapter.h>
#include <vcclr.h>
class UnmanagedAdapter : public ClientAdapter
{
public:
UnmanagedAdapter( ExternalAdapter ^, RSMSMailman * );
private:
gcroot< ExternalAdapter ^ > _wrapper;
};
// UnmanagedAdapter.cpp ****************************
UnmanagedAdapter::UnmanagedAdapter( ExternalAdapter ^a, RSMSMailman *m )
: ClientAdapter( m )
{
1st statement ....
// ***
}
// ExternalApplicaiton.cpp *****************************
ExternalAdapter has a private object of type UnmanagedAdapter. It's the wrapper class for UnmanagedAdapter.
ExternalAdapter::ExternalAdapter( )
{
_unmanagedAdapter = new UnmanagedAdapter( this, 0 );
}
Once this constructor is called, the code stalls on the construction of the _unmanagedAdapter I cannot even step to the 1st statement in the constructor.
Can anyone help please
- Travis McPhail

integrating c# and unmanaged c++ class libraries