Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2005

Tip: Looking for answers? Try searching our database.

tlbimp.exe and C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RicercatoreSbadato - 04 Oct 2005 13:20 GMT
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?
Robert Jordan - 04 Oct 2005 13:55 GMT
> 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
It seems an hard work..

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.