80004005 on Busy System.

  • Thread starter Thread starter john_bodoh
  • Start date Start date
J

john_bodoh

I have a REXX script that processes the contents of a folder. While
processing an Outlook folder, I randomly receive an 80004005 code. It
almost always occurs trying the retrieve the body of an email. It
also seems to be totally random. I could run the program twice in a
row and get a different number of errors against different emails.

After further experimentation, I found that the errors would occur
when something else was going on the system. That is, I put out
messages as I process emails and error message when I encounter
errors. The program could be executing without any errors (or maybe
only one or two errors in 50 emails). Then, at the point I start some
other application (e.g., Freecell) or interact with some other program
(scrolling an editor), errors would begin to appear. I might
receive an error on from one to several emails consectively. Then, I
guess, when the other application settles down, errors cease.
Sometimes, it never recovers (maybe the system is busy doing something
I don't know about). I know that I can recreate the errors at will...
just by starting another application on the system. Since it is
random and most emails work fine, it appears that there would
something wrong on the Outlook side.
From what I have read, the 80004005 condition is pretty common and may
be caused by a variety of things. I don't know where to start. If
it's something I've got to change, I need directions or a pointer to
directions that can guide me through diagnosing the problem. If it is
an Outlook bug or some other system bug, is there a fix. If not,
when.

Thanks,
 
What is your code? How and when do you release the MAPI objects?

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

The basic REXX code I use is:

outlook = .OLEObject~New('Outlook.Application');/* Create Outlook
Object */
mapi = outlook~GetNameSpace('MAPI'); /* Get The Named Spaces In
Outlook */
inbox = mapi~folders('Personal Folders')~folders('Inbox');/* get
inbox folder */
mail_items = inbox~items; /* get items in
inbox */

mail_item = mail_items~getfirst;
do while .nil <> mail_item; /* process as long as mail
items */
body = mail_item~body; /* get body of
email */ <---This statement fails.
mail_item = mail_items~getnext; /* get next mail
item */
end;
 
What is your code? How and when do you release the MAPI objects?

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

I believe the REXX interpreter automatically releases the MAPI objects
when there no more REXX variables referencing them.
 
I don't know, I really know nothing about REXX, sorry. What kind of message
store are you using?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
I don't know, I really know nothing aboutREXX, sorry. What kind of message
store are you using?

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

I created a VB macro to the same thing and I couldn't get it to fail.
I have reported the problem to REXX.
 
Back
Top