Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2004

Tip: Looking for answers? Try searching our database.

Outlook Redemption

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Glyn Meek - 16 Dec 2004 04:51 GMT
We have just purchased a development tool called Redemption for Outlook
which lets us deal with that vagaries of interfacing to all the different
versions of Outlook. Works wonderfully well (although the documentation is
predictably DREADFUL!!).

Our problem: When we install and then run our software on other computers,
we get a runtime exception "Cannot create ActiveX control" in the routines
where we are creating a new redemption object (like
"SafeContactItem".renamed desktop_ContactITEM in our dll.). Again, this is
code works fine on a system where the desktop. dll HAS been registered - ie
my development system. We are using Visual Studio/2003 and Visual Basic, and
in the VS installation/Setup project, I have tried making the desktop.dll
file register as vsdraCOM and vsdraCOMRelativePath.

Does anyone else have experience of using this tool (we can't get hold of
their support folks to save our lives, even though it cost us $199 for the
software!!!!!).  It seems to be a problem putting their dll into the
registry!!

HELPPPPPPP anyone?

Glyn Meek
Dmitriy Lapshin [C# / .NET MVP] - 16 Dec 2004 11:46 GMT
If desktop.dll is a .NET assembly, try registering it with regasm.exe and
specifying the /codebase option.

In a setup project, create a custom action and either launch regasm.exe with
/codebase (ugly as it will bring up a console window), or use
System.Runtime.InteropServices.RegistrationServices with the
AssemblyRegistrationFlags.SetCodeBase turned on.

Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

> We have just purchased a development tool called Redemption for Outlook
> which lets us deal with that vagaries of interfacing to all the different
[quoted text clipped - 18 lines]
>
> Glyn Meek
Dmitry Streblechenko \(MVP\) - 16 Dec 2004 20:30 GMT
Since you customized the dll to use custom class names and GUIDs, you need
to be careful about how you create the objects: if you use the regular
"new", the compiler hardcodes the class GUID, which is obviously missing.
Try to use something like

Type t = Type.GetTypeFromProgID("MyDll.MyMailItem");
SafeMailItem sItem = (SafeMailItem) Activator.CreateInstance(t);

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

> We have just purchased a development tool called Redemption for Outlook
> which lets us deal with that vagaries of interfacing to all the different
[quoted text clipped - 18 lines]
>
> Glyn Meek
Dmitriy Lapshin [C# / .NET MVP] - 17 Dec 2004 08:19 GMT
Dmitry,

I guess you're the author of Outlook Redemption :-)

See, the original poster says the DLL works fine on his development
computer - and it stops working when deployed to another computer. As we
know, the GUIDs cannot change if a DLL is just being copied to another
machine. Therefore, it is unlikely that the problem is with hard-coded
GUIDs. On the other hand, .NET has specific rules on where to search for an
assembly. Once a COM-visible assembly is registered without the /codebase
option (which probably happens in the original poster's installer), the
Fusion loader might be unable to find it when an instance of an object from
this assembly is requested. The /codebase option guarantees the loader is
always able to find and load the assembly and to create a COM-Callable
Wrapper for the requested object instance.

Signature

Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

> Since you customized the dll to use custom class names and GUIDs, you need
> to be careful about how you create the objects: if you use the regular
[quoted text clipped - 38 lines]
>>
>> Glyn Meek
Dmitry Streblechenko \(MVP\) - 18 Dec 2004 05:03 GMT
Actually Redemption allows to customize the dll to change the class names
and GUIDs - this way the library does not even look like the original dll.
Just a security feature :-)
.Net hardcodes some GUIDs at compile time, and the trick is trying to avoid
that using GetTypeFromProgID.

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

> Dmitry,
>
[quoted text clipped - 54 lines]
> >>
> >> Glyn Meek

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.