posts - 0, comments - 1573, trackbacks - 0

Error: CLSID {3FA7DEB3-6438-101B-ACC1-00AA00423326} failed with error 80040154.

I was dealing with a MAPI application in C# and when I tried to call the following code I got a nasty error message:

MAPI.Session session = new MAPI.Session();

The actual error message I received was

Error: Retrieving the COM class factory for component with CLSID {3FA7DEB3-6438-101B-ACC1-00AA00423326} failed due to the following error: 80040154.

My development environment is:

  • Windows Vista Ultimate x64
  • Microsoft Visual Studio 2005

I found that my application Platform Target was set to Any CPU, changing this to X86 resolved the error.

image

Print | posted on Monday, September 17, 2007 9:59 AM |

Feedback

Gravatar

# re: Error: CLSID {3FA7DEB3-6438-101B-ACC1-00AA00423326} failed with error 80040154.

This is because MAPI is 32 bit only, and explicitly unsupported when called from .NET.

It will not, ever, work in 64 bit mode.

We had to write a seperate worker app in C++ to get it stable enough for commercial use, so if you are only working with Ex2007, I strongly suggest you look t the web services, NOT MAPI - it's a dog, impossible to debug and maintain once it gets complex, and microsoft will NOT support it - even if you pay - if you are calling it from .NET.

:)

Oh yeah, you mantra: close you handles ;-) tho generally, you can't force them closed in .NET, which is part of the problem. Expect to cycle the process often :)
9/17/2007 3:02 PM | Nic Wise
Gravatar

# re: Error: CLSID {3FA7DEB3-6438-101B-ACC1-00AA00423326} failed with error 80040154.

mate, this post saved my life!! building an app calling 3rd partie lib's on a vista 64 ult + vs 2005 and kept breaking with that error.

i had to install a virtual pc with xp and build everytime on that!

thanks heaps.
5/14/2008 10:26 PM | lucas
Gravatar

# re: Error: CLSID {3FA7DEB3-6438-101B-ACC1-00AA00423326} failed with error 80040154.

I have the same problem, but get resolved it with the comment.
6/9/2009 1:57 AM | Fabricio Gomes
Gravatar

# re: Error: CLSID {3FA7DEB3-6438-101B-ACC1-00AA00423326} failed with error 80040154.

i have this problem now sloved.

thank you
4/23/2010 3:13 PM | ruslan
Gravatar

# re: Error: CLSID {3FA7DEB3-6438-101B-ACC1-00AA00423326} failed with error 80040154.

Hi,

I am trying to retreive metadata from OLE Using DSOFile.dll. Its working perfectly fine on my XP X86 Environment.
When i run the same in Windows Server x64 Environment, I am getting Error Saying "

System.Runtime.InteropServices.COMException was caught
Message=Retrieving the COM class factory for component with CLSID {58968145-CF05-4341-995F-2EE093F6ABA3} failed due to the following error: 80040154.
Source=FileShareToSP2010Accelerator.UI.ConfigControl
ErrorCode=-2147221164
StackTrace:
at FileShareToSP2010Accelerator.UI.ConfigControl.ConfigControl.GetFolderItems(String folderPath) in E:\SP2010Migrations\FileShareToSP2010Accelerator\DEV\Source\Client\FileShareToSP2010Accelerator.Client\UI\FileShareToSP2010Accelerator.UI.ConfigControl\ConfigControl.cs:line 631
at FileS

Code:
Installed DSOFile from the following location
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=9BA6FAC6-520B-4A0A-878A-53EC8300C4C2&displaylang=en

then add the reference DSOFile.DLL to my project ,
DSOFile.OleDocumentPropertiesClass oDso = new DSOFile.OleDocumentPropertiesClass();
oDso.Open(sFileName, true, DSOFile.dsoFileOpenOptions.dsoOptionDefault);
string strAuthor = oDso.SummaryProperties.Author;

This is working fine for XP x86 and not Working for Server 2008 X64 bit envirnoment
Any Pointers on how to retreive metadata on Windows Server 2008 using DSO File Would be great help.

Thanks,
Devi Prasad M
9/29/2010 12:52 AM | Devi Prasad M

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 3 and 4 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET