Solved

multithreading in vb

Posted on 2002-07-03
7
232 Views
Last Modified: 2010-05-02
is it possible to do multithreading in vb?
if yes then i want to develop mail server which is able to respond to more than one client at a time?
is that possible?
for example, smtp is listening on 25 and pop3 on 110, if one client is sending a big mail which may take one minute then is smtp / pop3 able to respond to other e-mail clients in that particular one minute

please reply soon
thank you very much
hemali sutaria
0
Comment
Question by:hemalisutaria
7 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7126605
0
 
LVL 5

Expert Comment

by:rpai
ID: 7127113
0
 
LVL 18

Accepted Solution

by:
mdougan earned 200 total points
ID: 7132084
Under VB5 it was possible to multi-thread by calling the CreateThread windows API.  However, under VB 6, they changed the threading model of VB so that calls to CreateThread causes your program to crash.

The only way to do this under VB 6 is to call a component that is written in some other multi-threading language, such as C or C++, which will generate/manage the threads.

I've seen some references to OCX controls for doing just this, so, try searching the web for multi-threading OCX.

I believe that Desiware has one, for a start, but theirs might be somewhat expensive.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 49

Expert Comment

by:DanRollins
ID: 7971412
Hi hemalisutaria,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept mdougan's comment(s) as an answer.

hemalisutaria, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8019144
I disagree with the recommendation so I will leave this open.  It appears on the surface that the application provided by rpai's link provides multi-threading and it indicates it works in VB6.  This leads me to believe it may be possible and perhaps even angelIIIs code may also work.  Will somebody please give these a shot and let me know one way or the other.  Thanks, it will be very much appreciated.  I'll give this the standard 3 day waiting period.  After which, upon not hearing from anyone, I intend to PAQ without a refund.

SpideyMod
Community Support Moderator @Experts Exchange
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8020998
My $0.02:

From the thread posted by AngelIII:
>> VB6 is much less thread-safe than VB5. The Msgbox function, for example, is notoriously unsafe for threading.

From the thread posted by rpai:
>> Unfortunately there is a reason why this code isn't already posted here on PSC, this is because this code tends to make VB *very* unstable...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
In my eyes, that make mdougan's recommendation the best and most complete answer (the others did not mention this apparently well-documented instability at all).  But I'm not an expert, just a day laborer with aspirations.

-- Dan
0
 

Expert Comment

by:SpideyMod
ID: 8095769
per initial recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now