How is StartMode determined / stored?

Add-in Express™ Support Service
That's what is more important than anything else

How is StartMode determined / stored?
 
Jack Johnson




Posts: 22
Joined: 2004-10-21
How is StartMode determined &/or stored? After protecting my Outlook add-in with Armadillo, "if StartMode = smFirstStart" always returns true. I've tried various Armadillo settings to correct this without success. All other add-in functions seem to be fine.

Any ideas on this one?

Thanks,

Jack
Posted 01 Nov, 2004 11:48:48 Top
Eugene Starostin


Guest


Hi Jack,

Usually we protect our commercial add-ins with ASProtect and there are no problems.

How does an add-in determine its start mode?
---
When an add-in is installed it adds to the add-in registry path a string value ADXStartMode = "FIRSTSTART". This value will be changed to "NORMAL" when the add-in is finished for the first time.

Queston.
---
Does your add-in finish correctly? Check the registry path of your add-in and make sure that the value is NORMAL.
Posted 01 Nov, 2004 12:12:53 Top
Jack Johnson




Posts: 22
Joined: 2004-10-21
Hi, Eugene -

Thanks for the info. I see that installing the add-in creates the correct registry entries, but after the add-in runs the first time ADXStartMode still shows "FIRSTSTART"... When you say the value is changed when the add-in is finished for the first time, do you mean when it is finished being loaded the first time, or finished being unloaded after the first execution? My protected add-in seems to load & unload OK, and all functionality seems OK, so I'm not sure why Armadillo would be interfering with this registry update. Maybe I can update it myself from within the add-in, though.

Thanks,

Jack
Posted 01 Nov, 2004 12:49:17 Top
Eugene Starostin


Guest


I mean the second - "finished being unloaded after the first execution".

Yes, you can update it yourself. But I'm interested to fix the problem if it corresponds with our code.

Can I ask you to send us your add-in source code, or only the code that runs on add-in finalization?
Posted 01 Nov, 2004 13:33:26 Top
Guest


Guest


Hi, Eugene -

I'm not in my office right now, so I can't send the source at the moment. I don't think that I'm doing anything tricky - the same stuff as in the demo add-in & log off of EasyMapi. I'll check again when I'm back in the office.

Please note that this works fine (i.e. there's no problem with "if StartMode = smFirstStart" always returning true) in the unprotected add-in, so I don't know that there's a problem with your code per se.

Thanks,
Jack
Posted 01 Nov, 2004 16:17:22 Top
Eugene Starostin


Guest


Jack,

Thank you for your cooperation. In any case it will avail for us. I'm going to seach Armadillo :-)
Posted 01 Nov, 2004 17:02:04 Top
Eugene Starostin


Guest


Hi Jack,

We have downloaded Armadillo, tested it with an add-in and got an exception. Could you please give us more detailed information:
- Armadillo settings
- Outlook version including SP
- OS version including SP

Thanks,
Eugene
Posted 02 Nov, 2004 07:50:11 Top
Jack Johnson




Posts: 22
Joined: 2004-10-21
Hi, Eugene -

The finalization code is dead simple:
===========
if MapiSession.Active then MapiSession.Logoff;
for i := FExplList.Count - 1 downto 0 do
begin
TExplorer(FExplList.Items[i]).Free;
FExplList.Delete(i);
end;
FreeAndNil(FExplList);
FreeAndNil(FExplorers);
Application.Handle := 0;
RwUnInitializeMapi(True);
===========

A few Armadillo settings have to be changed from the defaults to work with dlls, and in particular with dlls under Windows 9x:
- set Protection Options to Standard protection only
- set Interception Options to Intercept None
- set Other Options to disable INFO, disable REGISTER, and disable Monitoring Thread

I've made other changes to match how I'm handling registration, etc., but I think those are the essential changes to get it working.

I'm developing on Win XP SP2 + hotfixes using Outlook 2003 + all patches & fixes, but testing on Windows 98 through Xp with Outlook 2000, 2002, and 2003, and Exchange Server 2000.

Thanks,
Jack
Posted 02 Nov, 2004 09:37:37 Top
Eugene Starostin


Guest


Thank you, Jack.

We have protected with Armadillo (trial version) and got "Load library failed" / "GetLastError returns Ox0000045A".

I think the problem relates to Armadillo.
Posted 02 Nov, 2004 11:03:46 Top
Jack Johnson




Posts: 22
Joined: 2004-10-21
Hi, Eugene -

My apologies! I forgot that I'm using a test release of the latest version of Armadillo, since the current release version was giving that error... I'll take up this problem with the Armadillo folks - hope this didn't waste a lot of your time!

Thanks,
Jack
Posted 02 Nov, 2004 11:09:51 Top