?
Solved

Asynchronous Multi-threading ActiveX dll's

Posted on 2003-03-11
11
Medium Priority
?
265 Views
Last Modified: 2011-09-20
I need to do this for a project i'm working on and i have no idea where to start.

I know threading in VB 6 isn;t a strong point but how bad is it really, will it work!

Thanks for the help

G
0
Comment
Question by:g_land
[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
11 Comments
 
LVL 3

Expert Comment

by:Diveblue
ID: 8113872
True multithreading in vb6 is tricky. Does your project allow for using an activex exe?
0
 

Author Comment

by:g_land
ID: 8114005
well i was hoping to use activex dlls if thats any good

more info on the project:

making spamassassin work under a exchange\outlook environment

i'm catching the new mail event and then i want to fork a asynchronous activex dll that will run, do what it has to do and then terminate, the calling process does not need to know when it terminates.

also it has to allow the creation of multiple activex dll as a new mail might arrive before the previous mail is finished being processed!

Thanks for your help guys

G
0
 

Author Comment

by:g_land
ID: 8114808
well i was hoping to use activex dlls if thats any good

more info on the project:

making spamassassin work under a exchange\outlook environment

i'm catching the new mail event and then i want to fork a asynchronous activex dll that will run, do what it has to do and then terminate, the calling process does not need to know when it terminates.

also it has to allow the creation of multiple activex dll as a new mail might arrive before the previous mail is finished being processed!

Thanks for your help guys

G
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:Diveblue
ID: 8114875
You need yo use an activex exe if you want this to be asynchronous (DLLs run in the same process as the exe that uses them). Do you have any experience with this? There probably too much info you need to give you a complete answer here, but the short version is

1)build an active x exe that exposes the appropriate method to the caller.

2)have the exe use an internal message queueing mechanism (collection, array, or other)

3)Have the exposed method add the required detail to the queue you designed and return control

4)Use a timer in the activex exe to process the queued detail.

5)have the client (spamassasin?) call the exposed method of the activex exe.


Dan Appleman's book "Developing Com/Activex Components With Visual Basic 6" is an excellent resource.
0
 

Author Comment

by:g_land
ID: 8116050
well i was hoping to use activex dlls if thats any good

more info on the project:

making spamassassin work under a exchange\outlook environment

i'm catching the new mail event and then i want to fork a asynchronous activex dll that will run, do what it has to do and then terminate, the calling process does not need to know when it terminates.

also it has to allow the creation of multiple activex dll as a new mail might arrive before the previous mail is finished being processed!

Thanks for your help guys

G
0
 
LVL 3

Expert Comment

by:Diveblue
ID: 8119851
An activex Dll can NOT work asynchronously unless you perform your multi threading with api calls (in which case you don't realy need the dll)
0
 

Author Comment

by:g_land
ID: 8120031
ok if i start using activex exe's how do i call process within the exe

sorry about all the posts with tthe same stuff, i don;t know why thats happening
0
 
LVL 3

Accepted Solution

by:
Diveblue earned 200 total points
ID: 8121153
You need to make the method public. I would suggest reading the vb help article "Creating an ActiveX EXE Component"

(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconcreatingoleserver.asp)

scott
0
 

Expert Comment

by:CleanupPing
ID: 8900294
g_land:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9097081
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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
Course of the Month9 days, 17 hours left to enroll

762 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