CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Question Extract interface from COM obj PLS HELP

    I have an ancient COM object written in VB, and I want to extract its interface(s) to rebuild things in C#.

    I tried to add it to a solution, and I can see all the interfaces in Object browser. But how to extract things? There a lots of functions, so I'd rather do things automatically.

    I had hoped I could just rightclick the Interop and select "Extract Interfaces"...

  2. #2
    Join Date
    Jul 2012
    Posts
    90

    Re: Extract interface from COM obj PLS HELP

    You can use the OLE/COM Object viewer (OleView.exe) installed with either the Windows or .Net SDK to view the embedded type library in ODL (Object Definition Language). This can be saved to a file and used as a guide to manually creating a C# interface. ODL is pretty straight-forward. Use the "View TypeLib" option and select your VB com object's exe/dll file.

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Extract interface from COM obj PLS HELP

    Have you tried using the "Add Reference" feature and the COM tab?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured