Results 1 to 14 of 14

Thread: msinet.ocx (InetCtls) problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    123

    Angry msinet.ocx (InetCtls) problem

    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?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: msinet.ocx (InetCtls) problem

    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    123

    Re: msinet.ocx (InetCtls) problem

    how would an install package help in this case? this control is late binded at it exists on any computer with VB runtime installed.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: msinet.ocx (InetCtls) problem

    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.

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: msinet.ocx (InetCtls) problem

    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.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: msinet.ocx (InetCtls) problem

    Which version of VB 6 are you using? The Learning Edition?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    123

    Re: msinet.ocx (InetCtls) problem

    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.

  8. #8
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: msinet.ocx (InetCtls) problem

    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?

  9. #9

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    123

    Re: msinet.ocx (InetCtls) problem

    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).

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: msinet.ocx (InetCtls) problem

    So your using

    Dim oInet As Object
    oInet = CreateObject("InetCtls.Inet")

    '...
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    123

    Re: msinet.ocx (InetCtls) problem

    yep, see my original post.

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: msinet.ocx (InetCtls) problem

    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"
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    123

    Re: msinet.ocx (InetCtls) problem

    I already did both of those checks, the file registered fine and the class exists in the registry.

  14. #14
    New Member
    Join Date
    Aug 2008
    Posts
    1

    Re: msinet.ocx (InetCtls) problem

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width