none
Regasm and interop.* assemblies RRS feed

  • Question

  • Is there ever a valid reason to run RegAsm on a Interop assembly that simply wraps COM objects to be consumed by .Net? 

    I thought you would only ever run RegAsm on an .Net Assembly that wishes to expose  it's own classes/interface via COM. 

     

    Thanks,


    Richard.
    Monday, February 14, 2011 8:13 PM

Answers

  •  

    Registry .NET assembly as COM server makes the access to .NET assembly's types/methods easier for native clients. For managed clients, they should add reference to the .NET assembly directly.

     

    It is possible to use ragasm against an interop assembly (Interop.**.dll), but the interop assembly is just a wrapper of underlying COM server; I didn't test whether a native client could access the COM server exposed by an interop assembly, if it can be done, a call from native client to COM server need to go through .NET layer:

     

    native client (C++) --> .NET Interop --> COM server

     

    the performance will not be good.


    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by RichJ79 Tuesday, February 15, 2011 12:06 PM
    Tuesday, February 15, 2011 4:51 AM