|
-
Mar 12th, 2013, 11:29 PM
#1
Thread Starter
PowerPoster
Create Background Thread Using VB6
Stumbled across this article and thought would be of interest.
Don't have NET installed so can't try it unless component can be loaded without NET.
For those that have NET loaded here is the link:
http://msdn.microsoft.com/en-us/libr...=vs.71%29.aspx
-
Mar 12th, 2013, 11:50 PM
#2
Re: Create Background Thread Using VB6
Pretty old (and tired) article.
it also contains a lot of misinformation that shows the guy didn't really know VB6. Who uses DoEvents in real programs? I guess he'd never heard of async ADO operations. He erroneously states VB6 doesn't support multithreading. The list goes on and on.
.Net Interop ("inter clop?") is a pretty slow and nasty thing at best. It sucks RAM like crazy as well as requiring that you don't have a "broken" .Net on target machines. Yes, .Net sometimes breaks and cannot be repaired on machines runing Vista, Win7, and Win8 because parts get installed as Windows components. You can't reinstall or repair .Net without a full reinstall of Windows on such machines.
And the guy's library makes no provision for marshalling data to and from the background thread.
You are usually far better off using a 3rd party background threading library or the mechanism VB6 directly supports based on ActiveX EXEs than some doofy .Net library like his.
There are reasons why that technique is such a seldom used "lab curiosity." There were howls of laughter when MSDN published that article.
-
Mar 13th, 2013, 12:32 AM
#3
Re: Create Background Thread Using VB6
I would agree that it would not be a good idea to try and link in with a .Net library, better to just use .Net and be done with it. I have saw a few posts here about broken .Net environment but this is something that I have never experienced in the 10 or so years I have been working with it. I have it installed under XP, Vista, 7 and most recently 8 and have never had any issues nor have any of my customers ever reported any such issues. I think the only time I have heard of such a thing was here so I do not know what to make of it. Then again I have also saw some posts here about the Vb6 environment being broken so maybe it is just a case of PEBKAC
-
Mar 13th, 2013, 12:52 AM
#4
Re: Create Background Thread Using VB6
How to repair the .NET Framework 2.0 and 3.0 on Windows Vista covers the very few options that exist for repairing the fragile .Net ecosystem on Vista and later versions of Windows.
Sadly in most cases none of the easy remedies are effective. The one with the best chance of working requires that you create a new "installation disk" with all Service Packs successfully merged and then do a repair install. However the merge process is frought with problems and Microsoft refuses to provide pre-merged ISO images.
If you think this is rare you must not deal with very many PCs.
-
Mar 13th, 2013, 02:42 AM
#5
Re: Create Background Thread Using VB6
Actually I work with a lot of PCs though very few of them Vista. Several Windows 7 PCs currently and in the past tons of XP, Win2k and older. Of course very many is a retaliative term. To some that would mean 10 or 20 to others it would mean a few hundred. Just to give you an idea I run 6 in my office 3 of those with Windows 7, 1 with Vista, 1 XP and 1 Win2k, probably have about 50 customer sites that are running Windows 7 now and have been for some time. As of yet I have not saw nor had any reports of issues regarding the .net environment. None of my customers are using Vista and I rarely use it, I did have some major issues with it early on but that was not related to .Net my general opinion of Vista was poor at best and I used mostly XP until 7 was released. No problems with 7.
So apparently it is not as fragile as you may think. I have saw that link before, I think it was you who posted it then as well but that is the only mention I have heard of it to date.
-
Mar 13th, 2013, 07:36 AM
#6
Re: Create Background Thread Using VB6
I brought it up again only because I had to recommened to another client just this week that they'd have have to re-image 13 Windows 7 machines where .Net 3.5 is hopelessly broken. This is the second outbreak in less than a year for them and they haven't tracked down what might be causing it, but it isn't the same machines every time.
XP machines are easy to fix since .Net wasn't installed as protected OS software. Just uninstall and reinstall and you're done.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|