Constructor in a class that exposes a COM interface
Tech-Archive recommends: Fix windows errors by optimizing your registry
Date: Mon, 28 Feb 2005 08:06:22 -0600
I am implementing a C# class that exposes a COM interface so that a huge
body of code that pre-dates .NET can use it. I noticed if I put a simple
constructor in the class the class does not get registered properly as a COM
object.
class DoStuff
{
bool myState;
public DoStuff()
{
myState = true;
}
.
.
.
}
Without the constructor it registers just fine.
So, how do I get member variables initialized in this class that is exposed
as a COM object?
Craig
Relevant Pages
- Constructor in a class that exposes a COM interface
... I am implementing a C# class that exposes a COM interface so that a huge ... class DoStuff ... Without the constructor it registers just fine. ... (microsoft.public.dotnet.languages.csharp) - Re: .NET and ActiveX
... a .NET object that exposes a COM interface according to the ... which hides the actual .NET component. ... A .NET component exposed in a COM application via a COM Callable Wrapper ... The wrapper and the COM interfaces that it exposes allows a develepor ... (microsoft.public.dotnet.framework) - Re: Dual interface
... In my knowledge a component could only be used legally by interface ... could you kindly describe the usage ... scenario for such component which exposes only IUnknwon interface ... (microsoft.public.vc.language) - Re: Using same interfaces for in-proc vs. out-proc
... Application interface and the Document interface that is exposed through ... So is my observation correct that all coclasses ... The Application interface exposes just some basic things like version, ... (microsoft.public.vc.atl) - Re: implements interface
... An interface is nothing more than a class with function stubs rather than the implementation code that goes behind them. ... The other classes in your project may then implement that interface meaning that they are promising to expose the same functionality ... Set TempCast = MyClass ... VB will perform the type-cast for you when sending the object to the function since it's expecting something that exposes the ... (microsoft.public.vb.general.discussion) |
|