Stuart,
Both methods will pretty much do the same thing. If you add a reference
to the TLB file, it actually creates the interop dll for you, and references
that. It calls the same code that TLBIMP calls to generate the managed
assembly.
In larger environments, where the project is shared (and you don't want
to have each developer creating their own interop dll), it's probably better
to use TLBIMP and set a reference to that (you also have more control over
it, and can sign it, if you need to).
In the end though, they produce the same output (for the most part).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:Oz**************@TK2MSFTNGP15.phx.gbl...
I need to use a pre written C++ COM dll to interface to a TAPI Service
from my C# Application and was wondering the best way of using that dll
in C#.
I am able to access the methods of the DLL by adding a reference with
the tlb file but have also read articles re creating an intermediate dll
using the TlbImp utility and then referencing that in the C# project.
I am really looking for advice in what would be the best way about doing
this task.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!