Suspect Redemption Library Issue???

T

Tom at GSD

I have been requested to look at a VB 6.0 extension that is utilizing the
redemption library. It is rather a simple extension that employs a one button
command bar. The button simply adds an html item to the existing html message
in the new message window (HTML only - no word), uses the redemption library
to modify the some properties and a few other things. Essentially the active
code in the extension is ONLY utilized when the user adds this HTML via the
button and will not do anything if the user does not.

So if we create a message without clicking the button to add the HTML and
then send it (no HTML added) we get run-time error on XP SP2 and Vista. My
customer tells me that this just started happening to them after the latest
volley of security patches in the last few weeks.

Symptom #1: On XP we get the following runtime errors

0xD6A4010A AND 0XBFE4010A >>>
"Method '~' of object '~' failed

On Vista we get

0xEB44010A >>>
"Method '~' of object '~' failed

I set break points in the code and message boxes for the release version and
we do not hit any of the code within the extension.

Symptom # 2 - The problem does not happen on development machines (Visual
Studio 2003 & Visual Studio 6.0 installed) we do not get any errors at all.
We have tested this on three development machines. So as far as we can tell
this only happens on machines that are regular users.

Symptom #3 - The problem does not happen when we send an email with the HTML
added. This would mean that the redemption library is actively used and the
button has been depressed meaning the HTML was inserted.

Symptom # 4 - This happens with all versions of the Redemption DLL form 3.4
to 4.3.


Does anyone have any idea what is happening.

Thanks in advance!
 
D

Dmitry Streblechenko

Do I understand correctly thar if you do *not*use Redemption at all (i.e.
the button is not clicked and no Redemption object is ever
created/referenced/etc), you get an error. Bu if you click on the button
(and load Redemption), you do *not* get the error.
Sounds like Redemption actually *fixes* the problem rather than causes one
:)

What happens if you uncheck Redemption from Tools | Options | Other |
Advanced | Add-in manager, then use Process Explorer from sysinternals.com
to see if Redemption.dll is even loaded by the eoutlook.exe process?

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

Tom at GSD

You understand correctly. This problem is bizaar. ;-)

Yes the redemption DLL is loaded.

Our customer tells us that this just started happening a couple weeks ago
after new Microsoft security updates were installed.

I am not really a VB programmer but I am going to try a couple other
experiments this morning. I am about at the stage to start commenting out
code and see if the problem goes away.
 
K

Ken Slovak - [MVP - Outlook]

PMFJI but is your non-Redemption code calling to close either the email item
or the Inspector in either object's Close event? That became an error in a
recent Outlook security update. It's also an error in Outlook 2007.
 
T

Tom at GSD

No I do not see that anywhere.

I did however comment out a block of code and the problem went away. This
included the inspector events. So we are still chopping away.
 
T

Tom at GSD

Okay Ken I found the issue that was causing the problem and it was deleteing
an inspector in the close event.

The programmer added the inspector to a User Property by doing the following.

NewInspector.CurrentItem.UserProperties.Add("EPInspectorIndex",
olNumber).Value = m_LastInspector

Then in the close event buried deep in the code I found the following.

Set oUserProp =
m_oInspector001.CurrentItem.UserProperties.Find("EPInspectorIndex")
If Not (oUserProp Is Nothing) Then oUserProp.Delete

This was truly a bizaar problem. Why does this not show up on development
machines? Do you have any idea?
 
K

Ken Slovak - [MVP - Outlook]

That doesn't seem to be actually deleting an Inspector, instead it just
deletes a UserProp that holds a number. I'm not sure what that number is or
where it's derived but deleting a UserProp shouldn't cause an error unless
it's something I don't know about.

The action of deleting a UserProp in a Close event may also be limited now,
just not documented. That would not be unheard of...

The original reference to what I was talking about is at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;929593, related to
Outlook 2007. Shortly after Outlook 2007 RTM a security update was posted
that extended this behavior to Outlook 2003 SP2. I discovered that watching
a customer's code break and asked the PM who owns the Outlook object model
about it and found out that had been backed into Outlook 2003 without
warning. Nice breaker of existing code. The reason was it sometimes caused
Outlook to crash, although I've never seen that here.

The applicable text from that KB is:
Some methods no longer work in the Inspector_Close event or in the
Item_Close event
In versions of Outlook that are earlier than Outlook 2007, a crash may occur
if you use one of the following methods in the Inspector_Close event or in
the Item_Close event: • The Inspector.Close method
• The Item.Close method
• The Item.Move method
• The Item.Delete method
To prevent this problem, a design change was made in Outlook 2007 so that
these methods no longer work in the Inspector_Close event or in the
Item_Close event. When you try to use these methods in the Inspector_Close
event or in the Item_Close event in Outlook 2007, you receive the following
error message:
The item's properties and methods cannot be used inside this event
procedure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top