Does VB6.0 support Multi-Thread Programming?
Hi,
Do you know if VB6.0 supports Multi-Thread Programming?
I wrote a sample according to MSDN, but I got an Exception while I run its .exe file.
My code is as below:
...
Dim lpThreadId As Long
lThreadHandle1 = CreateThread(ByVal 0, ByVal 0, AddressOf test_function, 0,0, lpThreadId)
...
If VB6 supports CreateThread() API,would you like give me a sample vb project?
Thank you.
xadave@sina.com
Re: Does VB6.0 support Multi-Thread Programming?
Multi-Threading is possible in VB 6. All you need to do is create an ActiveX.exe but be careful on how you resond to events by making sure you don't block yourself or you ActiveX.exe
Re: Does VB6.0 support Multi-Thread Programming?
We have production multi-threaded code VB6 code that's been in the field for years, using the CreateThread, et al, method... and yes, you have to be careful with blocking, etc, just like you would in any language.
wangdave, one thing we've found, however, is that you can't compile the code as Native, you've got to use P-Code. I'm not completely sure why, but it might be causing your exception.
Hope that helps...