Click here to Skip to main content
Sign Up to vote bad
good
See more: VB6ASP.NET
I have a dll built in VB6.0
 
When I tried using in .NET, I was getting error as CLSID(with a class id value) not found.
I recreated the dll on my machine. It worked.
 
THe problem is when I move my application to another machine, the error is reproduced. If I recreate the dll on that machine and then refer th newly created dll, it works. Again, I cannot bring back the code to previous machine.
 
What is the ideal way to use a VB6 dll? It also creates an Interop dll while referring.
Posted 3 Feb '13 - 12:59
Ashok26337

Comments
Mike Meinz - 3 Feb '13 - 19:04
I didn't bother with trying to have a .NET application load and use a VB6 DLL. Instead, I opened my VB6 source code into Visual Studio .NET, fixed up a few syntax errors and compiled my DLLs with VB .NET. It didn't take long and it's nice to be able to work with all of them within the same version of Visual Studio. I suspect the problem that you are experiencing is related to the fact that the VB6 DLL is not registered on the computer that did not create it. You probably have to register it on each computer where you subsequently install it.
Espen Harlinn - 3 Feb '13 - 19:11
That certainly sounds like a good advice :-D
Sergey Alexandrovich Kryukov - 3 Feb '13 - 19:21
Agree... —SA
Sergey Alexandrovich Kryukov - 3 Feb '13 - 19:21
Why? why?! —SA
Ashok26 - 4 Feb '13 - 0:34
The VB6 application is a WinSocks application and it is client. I do not want to convert it to save some time.

2 solutions

hi dear,
 
1. you can give reference of VB6 dll in .net, but some time it is not working because of some extra ordinary funciton used in VB6 Dll.
For that you can convert that dll in COM component and you can use in .NET.
 
2. please note that if dll directly referenced into .net then sometimes you have have to registered that dll before run/build program by using regsvr32.exe
  Permalink  
Comments
Ashok26 - 4 Feb '13 - 0:40
I was able to do this and the issue is resolved. Now, a new question: Will there be any dependency on 32-bit platform. I mean for now its working. But do I need to do anything different when I move the application to a 64-bit machine?
Try to register the VB dll on the client machine and then try again.
To register, use the RegSvr32 command from the dos prompt.
  Permalink  
Comments
Ashok26 - 4 Feb '13 - 14:34
I have registered the dll on the othe machine I want to use as server. Now I get error "Creating an instance of the COM component with CLSID {0FB78A3B-2E82-4C9C-A7B0-DF5F186B1168} from the IClassFactory failed due to the following error: 800a0153" I checked references used in VB6 project. The project uses references of VB6 runtime only. Do I need to install VB6 runtime on server machine before using dll?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 318
1 Sergey Alexandrovich Kryukov 143
2 Mohammed Hameed 123
3 Santhosh G_ 108
4 Lohith Korupolu 85
0 Sergey Alexandrovich Kryukov 8,266
1 OriginalGriff 6,306
2 CPallini 3,528
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 4 Feb 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid