Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo

  Unable to upgrade VB6 COM Dll to VB.Net (Tuesday, December 21, 2004)




Found the following interesting discussion in the Newsgroups:

Unable to upgrade VB6 COM Dll to VB.Net
by:Shailja

I read lots of stuff on MSDN relating to upgrading a COM
Dll build using VB6 to VB.Net. Its seems to be a very easy
task. As per few articles when we open vb6 application
in .Net framework upgrade wizard is invoked. The wizard
gives us option to create DLL (option to create EXE is
grayed). Then articles says that if we want methods of
public classes to be converted to interface methods check
the box for Generate Interfaces For Classes. Now at my end
this checkbox does not appear on Page 2 of the wizard. I
have got version 7.1. The result is that my application is
upgraded successfully but the upgrade HTML displays
GenerateInterfacesForClasses = FALSE. Moreover when i try
to create a TLB using a utility i only get methods of
IDispatch Interface. TLB does not have my interface
methods , although it do create entry for my interface.
Please through some light on this problem.
Thanks in advance,
Shailja


 Reply:
by:Ken Tucker [MVP]

 Hi,

Set the comvisible attribute for the class.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemruntimeinteropservicescomvisibleattributeclasstopic.asp

Use regasm.exe to register the class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfassemblyregistrationtoolregasmexe.asp

Ken


 Reply:
by:Shailja

 
Thanks Ken, your tip did helped me to solve the problem.

Regards,
Shailja








0 Comments:

Post a Comment

 
Previous Posts
    - TypeConverter.CreateInstance-Method
    - vb.net & word
    - How to let GUI application write output to command...
    - Copy object with .Net?
    - Find the cursor position in a textbox
    - Extracting Image Metadata
    - NTFS Folder Permissions
    - To suspend the events
    - Get network status through WMI
    - Big red cross in DataGrid.. ?

Archives
    - 10/03/2004 - 10/10/2004
    - 10/10/2004 - 10/17/2004
    - 10/17/2004 - 10/24/2004
    - 10/24/2004 - 10/31/2004
    - 10/31/2004 - 11/07/2004
    - 11/21/2004 - 11/28/2004
    - 11/28/2004 - 12/05/2004
    - 12/05/2004 - 12/12/2004
    - 12/12/2004 - 12/19/2004
    - 12/19/2004 - 12/26/2004
    - 12/26/2004 - 01/02/2005
    - 01/23/2005 - 01/30/2005
    - 01/01/2006 - 01/08/2006
    - 09/24/2006 - 10/01/2006

Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland