Link to home
Start Free TrialLog in
Avatar of g_land
g_land

asked on

Asynchronous Multi-threading ActiveX dll's

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
Avatar of Diveblue
Diveblue

True multithreading in vb6 is tricky. Does your project allow for using an activex exe?
Avatar of g_land

ASKER

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
Avatar of g_land

ASKER

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
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.
Avatar of g_land

ASKER

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
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)
Avatar of g_land

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Diveblue
Diveblue

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?
Avatar of DanRollins
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer