Re: MSIDL to C#



"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:OdxnzXu6FHA.3804@xxxxxxxxxxxxxxxxxxxxxxx
> Random,
>
> Oddly enough, it is possible, but it won't ALWAYS map correctly.
> However, most of the time, it does.
>
> You should check out Reflector, located at (watch for line wrap):
>
> http://www.aisto.com/roeder/dotnet/
>
> Basically, you can compile the IL into an assembly, then disassemble it
> using this tool, and it will give you the C# source code.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> "Random Task" <Random@xxxxxxx> wrote in message
> news:JWLef.1895$KP5.263272@xxxxxxxxxxxxxxxxxxxxxxxx
>> Can anyone tell me if it is possible to generate C# from IDL/MSIDL ...
>>
>> I would love a www refence with a command example if possible :-)
>>
>> Cheers,
>> Random
>
>

The OP said I*D*L not IL. I guess he's talking about the COM interface
definition language - or a typo ;-)

You cannot generate C# from IDL AFAIK. Things like IUnknown have no
correlation in .NET as its garbage collected rather than reference counted.

What are you trying to acheive?

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk?


.



Relevant Pages

  • Re: A basic question about constants. A final field that is not final?
    ... Actually, final has been removed in the source code in src.zip but it is not removed in the online javadoc at http://java.sun.com/j2se/1.5.0/docs/api/index.html, and, worse, the field of the binary version is final yet. ... I have another problem with CachedRowSetImpl. ... Do you know if I can get the source code of this implementation of CachedRowSet? ... the changes will not be committed until one of the CachedRowSet interface transaction methods is called. ...
    (comp.lang.java.help)
  • Re: how to limit access to source code...
    ... > interface and also additional code for some calculations. ... > to limit access to the source code for the gui itself. ... implementing Calc, compiles it, puts the class file to the classpath. ...
    (comp.lang.java.programmer)
  • Re: C# Plugin system - same interface in two different assemblies...
    ... Yes - the source code for the interface is present twice. ... they only have to reference the assemblies they *do* use. ... Duplicating source code just makes that worse, ... If there's a bug in an SDK client helper ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: COM... is it the best model so far?
    ... prevents you from using source code reuse as this sidesteps ... each component only specifies "required interface" and "provide ... there should be a glue component or container component that are ...
    (microsoft.public.vc.atl)