Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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:59pm
Ashok26359
Comments
Mike Meinz at 3-Feb-13 19:04pm
   
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 at 3-Feb-13 19:11pm
   
That certainly sounds like a good advice :-D
Sergey Alexandrovich Kryukov at 3-Feb-13 19:21pm
   
Agree... —SA
Sergey Alexandrovich Kryukov at 3-Feb-13 19:21pm
   
Why? why?! —SA
Ashok26 at 4-Feb-13 0:34am
   
The VB6 application is a WinSocks application and it is client. I do not want to convert it to save some time.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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 at 4-Feb-13 0:40am
   
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?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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  
v2
Comments
Ashok26 at 4-Feb-13 14:34pm
   
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 Shai Vashdi 1,518
1 Tadit Dash 350
2 Manas Bhardwaj 319
3 OriginalGriff 243
4 Sergey Alexandrovich Kryukov 205
0 Sergey Alexandrovich Kryukov 9,530
1 OriginalGriff 5,716
2 Peter Leow 4,320
3 Maciej Los 3,540
4 Abhinav S 3,373


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