Click here to Skip to main content
15,312,257 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
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
Comments
Mike Meinz 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 3-Feb-13 19:11pm
   
That certainly sounds like a good advice :-D
   
Agree...
—SA
   
Why? why?!
—SA
Ashok26 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.

Try to register the VB dll on the client machine and then try again.
To register, use the RegSvr32 command from the dos prompt.
   
v2
Comments
Ashok26 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?
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
   
Comments
Ashok26 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?

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900