|
-
Sep 18th, 2002, 02:22 PM
#1
Thread Starter
New Member
Can I use threads in visual basic 6?
Hi!
I'm developing Activex component in visual basic 6 and it need to used a thread in it.
Can I use threads in?
How can I do it?
thanks
cnavas
-
Sep 22nd, 2002, 03:09 AM
#2
Lively Member
u can take advantage of threads only in ActiveX EXE.
when u create ActiveX EXE, u can specify weather u want new thread for each client, a pool of threads or single thread to all of the clients.
an ActiveX DLL always run in the thread who create it (STA), it means that it cannot accessed concurrently by two or more clients.
VB don't give u the freedom to create COM object that can handle multiple calls concurrently (ie MTA object).
so take care of creating ActiveX EXE, because the objects creating in a different process, and matters like marshaling overhead etc. must considered.
-
Sep 22nd, 2002, 08:58 PM
#3
yay gay
you can be API i think...
-
Sep 23rd, 2002, 02:28 PM
#4
Frenzied Member
You can call CreateThread() in VB -it's a VB function. But you can only use it when you compile to pcode.
-
Sep 24th, 2002, 01:47 AM
#5
Lively Member
i read the comments that the other fellows suggest and i have something very important to say:
don't ever use the function CreateThread in vb.
u should read and understand very well COM Apartments before get writing some thread code.
link to the following for more info:
http://www.desaware.com/articles/threadingL3.htm
http://codeguru.earthweb.com/activex...artments1.html
-
Sep 24th, 2002, 07:36 AM
#6
Thread Starter
New Member
Thank you very much
Thanks for your help!
-
Sep 24th, 2002, 03:20 PM
#7
the api is not very stable though.
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
|