Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Threading

Posted on 2000-03-24
3
Medium Priority
?
239 Views
Last Modified: 2010-05-02
I have to create a set of threads (say 5 threads)to which I should be able to pass queries.Each thread should be able
to process a single query.once a thread has finished its process I should be able to pass next query. AllThese threads which I'm creating should be in
single exe and the query should be passed from different exe.How to do this?
note: if i make any thing exe.that
default will be one thread.i don't
want this extra thread.
0
Comment
Question by:rose15
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
wpsjr1 earned 50 total points
ID: 2657073
If you are using VB5 SP3 its possible to use CreateThread API.  However, this might not be a good idea ( see the article on threading by Daniel Appleman at http://www.desaware.com ) Other possibilities are an AX EXE set for Thread per object, or Matt Curlands sample on vbaccelerator at: http://vbaccelerator.com/codelib/tlb/threadapi_source.zip

It looks like Threading will become much easier when VB7 comes out.  I can't wait!  :)

Good Luck.

Paul

p.s.  I have a BAS module that allows Thread creation in VB5 SP3 if you like.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2686656
Threading without rocket science.

http://homepage.eircom.net/~carafa/TEMP/AWXB.zip 

Explanation / order of compilation
AWXB02MSG.exe - (ActiveX.exe, one thread for all objects) Messaging application that will take care of sending messages between spawned threads and the main application.
AWXB01Thread.dll - The code that will be run in each separate thread
AWXB04Starter.exe - (ActiveX.exe, one thread per object) Application that will take care of creating each new thread.
AWXB03Test.exe - Standard exe. Main application / test bed.

Hope this helps.

0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2699266
Oh great stuff... Why exactly did wpsjr1 deserve a "D"?

If you're going to give someone a shitty grade you could at least explain yourself.

And I'm sure that if you'd given wpsjr1 a chance, wpsjr1 would have been happy to explain the details of the proposed solution to your problem.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

609 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