COM class factory for component with CLSID {EFAC2D80-175B-11D2-9927-006097C27C31} failed due to the following error: 800040005.

I am developing an ASP/C#.NET solution in Visual Studio 2013 Ultimate. A client of mine has requested to validate users and connect my system to their existing document management database through a 32bit library called DFC.DLL (Documentum Foundation Classes), so when users type their user and password they are validated in their Documentum user and password ('inline').

I installed the libraries from the DFC packages, and then added the library as a COM reference.

I don't understand why it is not working, since the client have an easy and working sample, in a different machine, wich I have copied almost exactly the code.

Please yur help, almost urgently.
Thanks a lot!
José PerezAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

did you register the dfc.dll ?

you would open a command window (by typing cmd after WIN+R)  and then enter

regsvr32 "<full_path_to_folder_of_dfc_dll>\dfc.dll"

you will get a response whether it was successfully registered or not.

José PerezAuthor Commented:
Ok, I says "registered" but displays the same error.... Is it mandatory to reboot?

but the dll either should be in windows\system32 folder if 32-bit windows or in windows\syswow64 folder if 64-bit windows.

or you add the path where the dll resides to Path environment variable.

type PATH in command window to find out which paths are yet defined.

you may add paths to Path environtment variable at system settings - system - advanced - environment variables - Path either at User or System level.

PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

José PerezAuthor Commented:
sorry my delay.
I don't have a Syswow64 folder, it is a Windows 7 32 bits.
At the Path level I do have the right folder path.
if the registering was successful, you would find the active-x control in the registry (for example by searching for the dll name). then, you will see a reference to a class ID which is equivalent to the GUID you were referring for the active-x control. or you other way and check which GUID was used in your program. then search for this in the registry.  

if nothing helps you should try to use the sample code without changes. if that worked you could turn smoothly working code to your needs. if that doesn't work there probably are ambiguities in the registry, perhaps if older versions of the control were not removed properly.

José PerezAuthor Commented:
I have resolved this issue, in an strange way...
From the following link, i followed instructions on how to debug "System.Runtime.InteropServices.COMException" and the problem magically got fixed... don't know why, but it worked.

How to avoid a System.Runtime.InteropServices.COMException?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
José PerezAuthor Commented:
Sara, I think your answers were helpfull, I learned from them and potentially can bring people to get the solution to similar or the same problem but I don't know how should I assign points in this case (I resolved in a different way), can you make a suggestion?
Jose, thank you. you may close the question and choose your own comment (0 points) as the accepted solution. then give an assist to comments which have helped.

and the problem magically got fixed... don't know why, but it worked.
i read the article and it seems that they started visual studio as administrator. that could be necessary for visual studio older than vs2008 and to successfully register an active-x control once for a new user. if you followed that advice, it could explain why it suddenly worked and since registration normally is a one-off, it now worked also when starting visual studio as a normal user.

José PerezAuthor Commented:
No, I am using Visual Studio 2013 and I tested that activating the "Build/Exception" part worked as a charm for 2 development computers we have (Windows 7 Professional 32 bits English version).
I tested that activating the "Build/Exception" part worked as a charm

interesting. thanks for the information.

José PerezAuthor Commented:
Thank you Sara.
Have a great day!
José PerezAuthor Commented:
Finally I resolved as I explain above: "I tested that activating the "Build/Exception" part in Visual Studio 2013 worked as a charm"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.