M
Martin Plechsmid
Hello,
I have a MFC application that uses a COM object implemented in .NET
(C++/CLI). The COM object behaves as if it uses the SLA COM threading model
(i.e. serialized access). How to change the threading model to MTA
(concurrent access)?
The COM code looks like this:
[ComVisible(true)]
[Guid("<COM interface GUID>")]
[InterfaceType(ComInterfaceType::InterfaceIsDual)]
public interface class IPdfReport
{
public:
String ^GetPdf(<arguments>);
}
[ComVisible(true)]
[Guid("<COM class GUID>")]
public ref class PdfReport : public IPdfReport
{
public:
virtual String ^GetPdf(<arguments>);
}
There exists System.MTAThreadAttribute class. But according to
documentation, it can be applied to the Main() method of an application
only, not to a class.
Any hint?
Thank you,
Martin.
I have a MFC application that uses a COM object implemented in .NET
(C++/CLI). The COM object behaves as if it uses the SLA COM threading model
(i.e. serialized access). How to change the threading model to MTA
(concurrent access)?
The COM code looks like this:
[ComVisible(true)]
[Guid("<COM interface GUID>")]
[InterfaceType(ComInterfaceType::InterfaceIsDual)]
public interface class IPdfReport
{
public:
String ^GetPdf(<arguments>);
}
[ComVisible(true)]
[Guid("<COM class GUID>")]
public ref class PdfReport : public IPdfReport
{
public:
virtual String ^GetPdf(<arguments>);
}
There exists System.MTAThreadAttribute class. But according to
documentation, it can be applied to the Main() method of an application
only, not to a class.
Any hint?
Thank you,
Martin.