taylor_tails

A 3rd party has issued me with a DLL defining a Type Library. (TLB)

I wish to create a test stub of the COM Object the DLL is defining.

Does anyone know how I can do this

I can use tlbimp to USE a COM object in .NET, or tlbexp to use a .NET object from COM, but I don't see how (assuming it is indeed possible) to create a .NET object which has the interface of an existing COM object.

Part of me thinks this must be possible - since would this not be part of a migration strategy - I presume people must be reimplementing COM Servers written in C++ in C# all the time... no

Is there some combination of tlbimp / regasm I need to use

Do you know of any examples (which include the COM Server sending Events to the client)

Thanks for your help / thoughts.

Peter




Re: Visual C# General COM server stubbing in c#

Figo Fei - MSFT

Hi, Peter

Check this link: http://www.codeguru.com/csharp/csharp/cs_misc/com/article.php/c9065__1/

COM interop Tutorial: http://msdn2.microsoft.com/en-US/library/aa645736(VS.71).aspx

Hope it helps.

Thanks




Re: Visual C# General COM server stubbing in c#

taylor_tails

Thanks for your help, I now seem to have managed it.

I'm a bit suprised I had to hand code the c# from the idl but nevermind.

Plus the lack of inheritance had me stumped for a while, but when it's all there with events and everything I have to say it's pretty cool though.

Thanks,

Peter T