Click to See Complete Forum and Search --> : msinet.ocx (InetCtls) problem
highlife
Jul 6th, 2006, 01:52 PM
I am having a problem with the Internet Transfer Control in VB6. I know about the fix for design time liscening for this control (vb6cli.exe):
http://support.microsoft.com/kb/194751/
I am late binding the object in my program using:
Set oInetFTP = CreateObject("InetCtls.Inet")
This works fine on the development machine but when I move it to the server I get an "ActiveX cannot create object" error.
I can't run vb6cli.exe on the server because VB6 is not installed, what is the problem here? how can I fix it?
si_the_geek
Jul 6th, 2006, 02:39 PM
Create an installation package, and install the program on the server, don't just copy it across. ;)
If you need help with doing it, see this FAQ thread.
highlife
Jul 7th, 2006, 10:15 AM
how would an install package help in this case? this control is late binded at it exists on any computer with VB runtime installed.
si_the_geek
Jul 7th, 2006, 10:30 AM
The error "ActiveX cannot create object" basically means that it is not installed (or not installed properly) on that computer.
As far as I am aware, Inet (like many other things) is not part of the standard VB runtimes - it needs to be installed properly.
Al42
Jul 7th, 2006, 03:38 PM
INet is MSINET.OCX. VB6 can be completely installed and there can still be a bad (or missing) ocx file. MSINET.OCX may not be part of some VB6 versions.
RobDog888
Jul 7th, 2006, 03:41 PM
Which version of VB 6 are you using? The Learning Edition?
highlife
Jul 7th, 2006, 04:37 PM
VS6 Enterprise, but the problem is not on the development machine its on the server the app is being deployed to.
msinet.ocx exists in system32 and is properly registered on the server.
si_the_geek
Jul 7th, 2006, 04:41 PM
Is it the same version as you have on the development machine? (it can make a big difference - sometimes the object names change).
Does it work if you use an early-bound version?
highlife
Jul 7th, 2006, 04:58 PM
It's not the same version of the ocx but I checked and "InetCtls.Inet" is the version independant class name.
It doesn't work early bound either unless I host it on a form (which I don't want to do).
RobDog888
Jul 7th, 2006, 05:03 PM
So your using
Dim oInet As Object
oInet = CreateObject("InetCtls.Inet")
'...
highlife
Jul 7th, 2006, 05:07 PM
yep, see my original post.
RobDog888
Jul 7th, 2006, 05:09 PM
See if you can re-register the ocx on the server. You will need to location of the file as an argument in using regsrv32.exe.
Or maybe if your comfortable with using the registry you can verify that the class exists "InetCtls.Inet"
highlife
Jul 7th, 2006, 05:19 PM
I already did both of those checks, the file registered fine and the class exists in the registry.
ABTDeveloper
Aug 29th, 2008, 06:04 AM
This problem may be to do with MSINET.OCX and it's licence. I have just had to fix this problem and I thought I'd add my solution to this thread in case others find it on Google.
Instead of trying to instantiate the MSINET.OCX control by executing
Set thing = CreateObject("InetCtls.Inet")
actually create an invisible form. Drag an Inet from the toolbar onto the form and in your code try this...
Set thing = Form1.Inet1 ' whatever you called the Form and the control. This seems to "trick" the MSINET.OCX into realising it IS in a run-time environment, damnit.
This worked for me inside of an otherwise Formless VB6 program being executed within a Service.
The only other solution would be to install VB6. Something most customers won't be happy doing on a production server.
I hope this helps anyone else frustrated by their MSINET.OCX using executable behaving differently in a production environment to on their development machine.
Cheers all. :wave:
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.