locked
Generating Interop and AxInterop Dlls RRS feed

  • Question

  • Hi all,

    I have a user control on VB6 (.ocx file). I am adding the reference of the ocx file in a VB.Net(2005) project. I do right click on the toolbar and click choose items and go to the COM Component tab and select the ocx file and clicking on ok adds the VB6 user control in my VS2005. I am able to use those controls. It automatically generates the Interop.Mycontrols.dll and AxInterop.AxMyControls.dll.

    I want to genetate the Interop and AxInterop dlls to be generated manually. I tried usnig the Tlbimp.exe to generate the Interop dlls. But i was not able to use the dll generated manually using the tlbmip, by replacing the dlls generated autmatically by the .Net IDE.

    I used the following  format

                 tlbimp MyControls.tlb /out:MyControls.dll

    Is that way of using the tlbimp is correct, How shall i achive the Interop and AxInterop dlls using the tlbimp or some other tool?

    Thanks,

    Benin.

    Monday, August 28, 2006 6:31 AM

Answers

  • You don't - you should use Aximp.exe for that.

     

     

    Monday, August 28, 2006 10:36 AM

All replies

  •  Benin wrote:

    I tried usnig the Tlbimp.exe to generate the Interop dlls. But i was not able to use the dll generated manually using the tlbmip, by replacing the dlls generated autmatically by the .Net IDE.

    Why not, what happened? VS uses slightly different options than Tlbimp does by default, but you should definitely be able to replace it with Tlbimp and Aximp if you want.

     

    Monday, August 28, 2006 8:07 AM
  • How shall i generate the AxInterop dll using Tlbimp?
    Monday, August 28, 2006 9:44 AM
  • You don't - you should use Aximp.exe for that.

     

     

    Monday, August 28, 2006 10:36 AM
  • Thank you Aximp.exe hepled me.
    • Proposed as answer by userzz Tuesday, July 20, 2010 8:01 AM
    Monday, August 28, 2006 12:02 PM
  • Actually I know that whenever adding any COM DLL using IDE, it uses /sysarray and sometimes it creates problem. So, to avoid that we can manually generate the interop DLL using tlbimp.

    I have come across such problem in OCX. Can I generate AxInterop and Interop DLLs without sysarray option using aximp utility ?

     

    Monday, October 2, 2006 11:53 PM
  •  Benin wrote:
    How shall i generate the AxInterop dll using Tlbimp?
    Saturday, April 19, 2008 4:06 PM