By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,990 Members | 1,741 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,990 IT Pros & Developers. It's quick & easy.

Access 'Interop.dsofile.dll' via reflection

P: 6
Hi Everyone,

I am stuck to access file properties using 'Interop.dsofile.dll'. I dont want registration of this assembly in system registry. I am using reflection to achive this, but at the time of create instance (Activator.CreateInstance) of 'dsofile.OleDocumentPropertiesClass' it throw the following registry exception:

"Retrieving the COM class factory for component with CLSID {58968145-CF05-4341-995F-2EE093F6ABA3} failed due to the following error: 80040154."

Please help me, how i access file property using dsofile w/o registration in registry. Below are the code that i using, bold line is the cause of above exception:


Assembly dsoFile = Assembly.LoadFile(baseDirectory + "Interop.DSOFile.dll");
Type OleDocumentPropertiesClassType = dsoFile.GetType("DSOFile.OleDocumentPropertiesClas s");
object OleDocumentPropertiesClassInstance = Activator.CreateInstance(OleDocumentPropertiesClas sType);
MethodInfo OleDocOpenMethod = OleDocumentPropertiesClassType.GetMethod("Open");

Cheers,

Sanjay
Oct 28 '09 #1
Share this Question
Share on Google+
2 Replies


tlhintoq
Expert 2.5K+
P: 3,525
I dont want registration of this assembly in system registry.
Why don't you want to register the dll in the registry?
I sounds like you are in some way trying to be 'sneaky' when you know that by registering it your problem will be solved.
Oct 28 '09 #2

P: 6
Thanks for reply,

I know if i registered then it not create me any problem, this is windows application and it will deploying in multiple system. My deployment process is just copy paste nothing else. so i will only copy dsofile on server and it will copy by our syncronization process. By reflection i will direct using the methods of dsofile.dll.

Please let me know if i missed out any code part.. or any alternate way to handle this..

Sanjay
Oct 29 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.