[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Class not registered after migrating VB 6 code to VB.NET

Posted on 2003-10-23
12
Medium Priority
?
977 Views
Last Modified: 2007-12-19
Hi,

A colleague of mine running Win XP migrated a program fomr VB 6 to VB.NET.  Everything works on his PC and all his code is available to me.  I have Win 2000, same VS.NET as him and same version of .NET Framework.  When I run the code I get error "System.Runtime.InteropServices.COMException occured in system.windows.forms.dll" My colleague has newer Windows files which I tried to update but Windows 2000 is not having it ;-(  other than that I have everything he has in his setup.  My guess is that his interop dlls (The Runtime Callable dlls) expect certain version of the underlying COM dll which is not available on my PC.  Am I on the right path?  

I would appreciate help on this
Thanks

Hassan
0
Comment
Question by:gbzhhu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
12 Comments
 
LVL 6

Expert Comment

by:CarlosMu
ID: 9608451
First look in the solution explorer, on the reference folder if you put a reference to the dll.  Second even thougth Dot net does not uses the regisgistry when accesing a Dcom module such module must be register on the machine.  Check if you have register those ComMoudles are registered on you machine
0
 
LVL 12

Author Comment

by:gbzhhu
ID: 9615172
Carlos,

These COM dll are on the PC and are registered, however I found out that my colleague has VB 6 sp 6 whereas I have VB 6 sp 4, so I think that could be the cause.  If this is the case the points will be yours ;-)

Hassan
0
 
LVL 6

Expert Comment

by:CarlosMu
ID: 9615745
I'll apreciated it but I doubt that will be the case.  

Anyhow the com dll are on the pc and they are registerd.  Now please check that you have a reference to them on your project.  On the solution explorer there is a folder call reference. There should be an entry for this dll.  Even if there is an entry, try  this.  Remove the existing entry and recreate it.  Dot net will protect you from dll hell but only where it concerns manage code.
0
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 12

Author Comment

by:gbzhhu
ID: 9616205
OK, the COM files I am talking about are Windows Common Controls 6.  My colleague just gave me all the files VS created after the migration.  Now I have two files interop.MSComctl2.dll and interop.MSComctl2.dll and Axinterop.MSComctl2.dll I am not sure what the difference is (maybe it is the OCX and the dll) anyway I removed these from my references and added the COM dll reference.  After this I had many compile errors because Axinterop.MSComctl2.dll was referenced so I had to reinclude it.  This hasn't fixed my problem.

Other ideas?

Hassan
0
 
LVL 6

Assisted Solution

by:CarlosMu
CarlosMu earned 750 total points
ID: 9616636
No, sorry,  Maybe someone else.
0
 
LVL 1

Expert Comment

by:LastResort
ID: 9620392
Basically your collegue is using VB6 controls in his VS.Net projects (does he know this?). I got around alot of problems by downloading VB 5.0 CCE (control creation edition) which is a free download from Microsoft. The best solution, if you have the funds, is to install VB6 on your machine...
0
 
LVL 12

Author Comment

by:gbzhhu
ID: 9622304
Yes he does. I have VB 6 on my machine.  My colleague is running XP and I am running Win2k, the other difference is that his Windows common controls 6 has (sp6) and mine (sp4) no other difference in our invironment.  I tried ot get VB 6 serivce pack 6 installed but I can't find a release, I only see betas.  
0
 
LVL 1

Accepted Solution

by:
LastResort earned 300 total points
ID: 9624295
I think but can't prove that sp5 (http://msdn.microsoft.com/vstudio/previous/vs6/downloads/default.aspx) it the latest for VB6. The windows common controls should be updated with this. If you get everyone on the same version it would also rule that out of the problem space.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9629982
Yes, you need Service Pack 5 installed.  It is the latest version.  The GUIDs are different between SP5 and SP4, and the wrapper is looking for that particular control with the right GUID.
0
 
LVL 12

Author Comment

by:gbzhhu
ID: 9632993
installed sp5, got another little problem.  I have to get past that to see if the sp5 fixed the original issue.  will come back with result
0
 
LVL 12

Author Comment

by:gbzhhu
ID: 9635437
It turns out that my colleague doesn't have any VB 6 service pack! none at all, however his components Dialog in VB shows common controls 6.0 as (sp6)

Having looked here
http://support.microsoft.com/default.aspx?scid=/servicedesks/fileversion/dllinfo.asp&SD=msdn
and entering mscomctl.ocx I found out that Office XP updated the Common Controls.  I am surprised that Microsoft didn't release the update for Visual Studio.

I am now going to install Office XP and see what happens
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 450 total points
ID: 10224286
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: CarlosMu {http:#9608451} & TheLearnedOne {http:#9629982}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question