CreateThread works in VB, and it works surprisingly well. The BIG issue
is that VB isn't all thread safe. It isn't billed as thread safe. So
creating a thread may or may not step on something that it shouldn't
depending on what your thread does.
It's a huge "use at your own risk" item.
You can do multithreading in another way, and really well. MSDN
(shockingly) has a really good example called CoffeePot that has
multithreading with inter-thread communication. It's a great sample
that you should work through if you're serious about multithreading.
-------------------------------
Christopher Tacke, MCSD
President, IDSS, Inc. www.innovativedss.com
Pre-order my book today!
http://samspublishing.com/detail_sams.cfm?item=0672322773
-----Original Message-----
From: Marco Straforini [mailto:marco@c...]
Sent: Thursday, September 27, 2001 6:40 PM
To: professional vb
Subject: [pro_vb] Re: vb Threads
The CreateThread API is a big no no in Visual Basic. Only if you are
willing to spend hours coding you can make it works, just to see it
failing when you run VB with a different service pack. I am not saying
that it should be avoid, but you have to use it at your own risk. The
best documentation I found is on Daniel Appleman's
books (you can find good articles in his company web site,
www.desaware.com)
If the code that uses CreateThread was not written by you, I would
consider using a different solution to the problem (ActiveX exe is the
VB way to implement multiple thread, it is easy and working is
guaranteed)
m.
> Can someone please help!
> I'm having problems with a program witch uses the "CreateThread" API.
> It gives memory read errors when compiled.
>
> Maybe there is a better way to implement threads. Any help will be
appreciated.
>
> Thanks
> Jaco Lubbe
---
You are currently subscribed to pro_vb as: ctacke@r... To
unsubscribe send a blank email to $subst('Email.Unsub')