Access 'Interop.dsofile.dll' via reflection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanjay1983
    New Member
    • Oct 2009
    • 6

    Access 'Interop.dsofile.dll' via reflection

    Hi Everyone,

    I am stuck to access file properties using 'Interop.dsofil e.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.Crea teInstance) of 'dsofile.OleDoc umentProperties Class' 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.LoadFi le(baseDirector y + "Interop.DSOFil e.dll");
    Type OleDocumentProp ertiesClassType = dsoFile.GetType ("DSOFile.OleDo cumentPropertie sClass");
    object OleDocumentProp ertiesClassInst ance = Activator.Creat eInstance(OleDo cumentPropertie sClassType);
    MethodInfo OleDocOpenMetho d = OleDocumentProp ertiesClassType .GetMethod("Ope n");

    Cheers,

    Sanjay
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    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.

    Comment

    • sanjay1983
      New Member
      • Oct 2009
      • 6

      #3
      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

      Comment

      Working...