Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

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
0
g_land
Asked:
g_land
1 Solution
 
DiveblueCommented:
True multithreading in vb6 is tricky. Does your project allow for using an activex exe?
0
 
g_landAuthor Commented:
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
 
g_landAuthor Commented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
DiveblueCommented:
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
 
g_landAuthor Commented:
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
 
DiveblueCommented:
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
 
g_landAuthor Commented:
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
 
DiveblueCommented:
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
 
CleanupPingCommented:
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
 
DanRollinsCommented:
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now