> I'd like to use tlbimp to do a wrapper and put it in my C# code and not
> to create an assembly... how can I do it?
You cannot. Such assemblies use to contain declarations
that cannot be expressed by C# code.
You may use Reflector http://www.aisto.com/roeder/dotnet/
to extract the C# code, but don't expect that everything
will be correct.
Rob
RicercatoreSbadato - 05 Oct 2005 09:01 GMT
But the Reflector says that my dll has too methods. Do I have only to
copy the methods I need?
Robert Jordan - 05 Oct 2005 09:28 GMT
> But the Reflector says that my dll has too methods. Do I have only to
> copy the methods I need?
Open the interop assembly with Reflector, click on the
inteface(s) you want the source code for, right-click
and choose "Disassembler".
Rob
RicercatoreSbadato - 05 Oct 2005 13:21 GMT
Yes, but in my C# code do I have to put the code of every methods or
only the method I use?
Robert Jordan - 05 Oct 2005 13:32 GMT
> Yes, but in my C# code do I have to put the code of every methods or
> only the method I use?
You can replace the methods you don't use with
void Unused1();
void Unused2();
...
But take care to preserve the order of the methods. It may be crucial.
Rob
RicercatoreSbadato - 06 Oct 2005 07:57 GMT