R
ropo
I am using .NET 2.0
I have a C#.Net App, which uses a .NET Class Library, which accesses a
COM object through interop.
The C#.Net App also uses a mixed mode C++.Net Class library which uses
an unmanaged win32 DLL, which uses another unmanaged win32 DLL which
accesses the same COM object
The COM object is in another process.
Problem is When I attempt to access the COM object through both roots
the Application crashes without any messages. I can access the COM
object through either root but not both.
In the c# library I have something like:
LoggerClass _Logger = new LoggerClass() // interop wrapper for com
object
// this is called from the C#.Net app
public CSharp.Interface.Write(string strData)
{
_Logger.Write(strData);
}
In the C++ Win32 DLL I have something like:
void Write(LPCTSTR strData) // this is call from within another win32
DLL
{
// g_Logger is created in the first call using CoCreateInstance
g_Logger.Write(T2BSTR(strData));
}
I have a C#.Net App, which uses a .NET Class Library, which accesses a
COM object through interop.
The C#.Net App also uses a mixed mode C++.Net Class library which uses
an unmanaged win32 DLL, which uses another unmanaged win32 DLL which
accesses the same COM object
The COM object is in another process.
Problem is When I attempt to access the COM object through both roots
the Application crashes without any messages. I can access the COM
object through either root but not both.
In the c# library I have something like:
LoggerClass _Logger = new LoggerClass() // interop wrapper for com
object
// this is called from the C#.Net app
public CSharp.Interface.Write(string strData)
{
_Logger.Write(strData);
}
In the C++ Win32 DLL I have something like:
void Write(LPCTSTR strData) // this is call from within another win32
DLL
{
// g_Logger is created in the first call using CoCreateInstance
g_Logger.Write(T2BSTR(strData));
}