0

I am developing a portable application in VB6. My target platforms are Win XP - Vista - 7 - 8 ( I think all of them Have VB6 Run. I one part of My application , I need to read a small text file form Internet I used

Inet.OpenURL

And this is working well in Win Xp , But in Win7 I got this error

Run time error ‘339’: Component ‘MSINET.OCX’ or one of its dependencies not correctly registered: a file is missing or invalid.

As this is a portable application , I can't make a Setup file.

What Can I do?

Is it possible to include MSINET.OCX in my application file?

Is there any replacement for Inet.OpenURL Which works in Win 7 ?

Thanks

Arashdn
  • 691
  • 3
  • 11
  • 25
  • 1
    Yes, you can include MSINET.OCX with [registration-free COM](http://stackoverflow.com/q/465882/11683). – GSerg Mar 20 '13 at 10:37

1 Answers1

2

For something this simple you can use the MSXML XmlHttpRequest object instead. Version 3.0 should be present as part of Windows in nearly any version (even back to Win95 if IE 5.x was ever installed).

This is generally a cleaner option then the Internet Transfer Control as long as you don't need FTP but only HTTP/HTTPS. It can also be used for async requests if you deal with its script-style event binding.

If you are only doing simple GET requests you can simply use the AsyncRead method that is built into the VB6 runtime.

Bob77
  • 13,167
  • 1
  • 29
  • 37