Re: IDL to C#?
From: Mattias Sjögren (mattias.dont.want.spam_at_mvps.org)
Date: 07/16/04
- Next message: jez123456: "calling methods from within sql select statement"
- Previous message: Paul Ledger: "Re: RichTextBox"
- In reply to: Leon_Amirreza: "IDL to C#?"
- Next in thread: Leon_Amirreza: "Re: IDL to C#?"
- Reply: Leon_Amirreza: "Re: IDL to C#?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 16 Jul 2004 11:20:25 +0200
>Is there any tool that can convert and Interface definitions (especially
>oleidl.idl) to C# interface definitions?
>does MIDL.exe do that? i could just get c++ header files.
MIDL and TlbImp is the way to go. But for MIDL to produce a typelib I
belive you need a library {} block in the IDL file, which is missing
in Oleidl.idl.
But for non automation interfaces like those in Oleidl.idl, the IA
produced by Tlbimp isn't always perfect, and you may have to modify it
to make it really usable. So it's often easier to write your own COM
interface declarations directly in C# instead. You can find examples
of that in the .NET SDK directory
Samples\Technologies\Interop\Applications\ShellCmd
Mattias
-- Mattias Sjögren [MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup.
- Next message: jez123456: "calling methods from within sql select statement"
- Previous message: Paul Ledger: "Re: RichTextBox"
- In reply to: Leon_Amirreza: "IDL to C#?"
- Next in thread: Leon_Amirreza: "Re: IDL to C#?"
- Reply: Leon_Amirreza: "Re: IDL to C#?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|